ci: remove duplicate gosec & lint fixes (#21685)
This commit is contained in:
@@ -575,7 +575,7 @@ func TestConsensus_Query(t *testing.T) {
|
||||
c := setUpConsensus(t, 100_000, cometmock.MockMempool[mock.Tx]{})
|
||||
|
||||
// Write data to state storage
|
||||
c.store.GetStateStorage().ApplyChangeset(1, &store.Changeset{
|
||||
err := c.store.GetStateStorage().ApplyChangeset(1, &store.Changeset{
|
||||
Changes: []store.StateChanges{
|
||||
{
|
||||
Actor: actorName,
|
||||
@@ -589,8 +589,9 @@ func TestConsensus_Query(t *testing.T) {
|
||||
},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err := c.InitChain(context.Background(), &abciproto.InitChainRequest{
|
||||
_, err = c.InitChain(context.Background(), &abciproto.InitChainRequest{
|
||||
Time: time.Now(),
|
||||
ChainId: "test",
|
||||
InitialHeight: 1,
|
||||
@@ -630,6 +631,8 @@ func TestConsensus_Query(t *testing.T) {
|
||||
}
|
||||
|
||||
func setUpConsensus(t *testing.T, gasLimit uint64, mempool mempool.Mempool[mock.Tx]) *Consensus[mock.Tx] {
|
||||
t.Helper()
|
||||
|
||||
msgRouterBuilder := getMsgRouterBuilder(t, func(ctx context.Context, msg *gogotypes.BoolValue) (*gogotypes.BoolValue, error) {
|
||||
return nil, nil
|
||||
})
|
||||
|
||||
@@ -7,9 +7,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
"github.com/cometbft/cometbft/node"
|
||||
@@ -18,6 +15,8 @@ import (
|
||||
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
|
||||
cmtversion "github.com/cometbft/cometbft/version"
|
||||
gogoproto "github.com/cosmos/gogoproto/proto"
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
"cosmossdk.io/server/v2/cometbft/client/rpc"
|
||||
|
||||
|
||||
@@ -91,17 +91,22 @@ func (s *MockStore) GetStateCommitment() storev2.Committer {
|
||||
return s.Committer
|
||||
}
|
||||
|
||||
type Result struct {
|
||||
key []byte
|
||||
value []byte
|
||||
version uint64
|
||||
proofOps []proof.CommitmentOp
|
||||
}
|
||||
|
||||
func (s *MockStore) Query(storeKey []byte, version uint64, key []byte, prove bool) (storev2.QueryResult, error) {
|
||||
state, err := s.StateAt(version)
|
||||
if err != nil {
|
||||
return storev2.QueryResult{}, err
|
||||
}
|
||||
|
||||
reader, err := state.GetReader(storeKey)
|
||||
if err != nil {
|
||||
return storev2.QueryResult{}, err
|
||||
}
|
||||
|
||||
value, err := reader.Get(key)
|
||||
if err != nil {
|
||||
return storev2.QueryResult{}, err
|
||||
}
|
||||
|
||||
res := storev2.QueryResult{
|
||||
Key: key,
|
||||
Value: value,
|
||||
|
||||
Reference in New Issue
Block a user