diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 7716b01421ce..32e3b94e3ff6 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -2204,7 +2204,7 @@ func TestABCI_ProcessProposal_PanicRecovery(t *testing.T) { }) } -// TestABCI_Proposal_Reset_State ensures that state is reset between runs of +// TestABCI_Proposal_Reset_State_Between_Calls ensures that state is reset between runs of // PrepareProposal and ProcessProposal in case they are called multiple times. // This is only valid for heights > 1, given that on height 1 we always set the // state to be deliverState. diff --git a/client/v2/tx/encoder.go b/client/v2/tx/encoder.go index 09011c8315e4..d1d9abae192b 100644 --- a/client/v2/tx/encoder.go +++ b/client/v2/tx/encoder.go @@ -115,7 +115,7 @@ func encodeTextTx(tx Tx) ([]byte, error) { return textMarshalOptions.Marshal(wTx.Tx) } -// decodeJsonTx decodes transaction bytes into an apitx.Tx structure using JSON format. +// decodeTextTx decodes transaction bytes into an apitx.Tx structure using TEXT format. func decodeTextTx(cdc codec.BinaryCodec, decoder Decoder) txDecoder { return func(txBytes []byte) (Tx, error) { jsonTx := new(txv1beta1.Tx) diff --git a/crypto/ledger/ledger_secp256k1.go b/crypto/ledger/ledger_secp256k1.go index 3449d0bfd1b1..ac152162b1c8 100644 --- a/crypto/ledger/ledger_secp256k1.go +++ b/crypto/ledger/ledger_secp256k1.go @@ -332,7 +332,7 @@ func getPubKeyUnsafe(device SECP256K1, path hd.BIP44Params) (types.PubKey, error return options.createPubkey(compressedPublicKey), nil } -// getPubKeyAddr reads the pubkey and the address from a ledger device. +// getPubKeyAddrSafe reads the pubkey and the address from a ledger device. // This function is marked as Safe as it will require user confirmation and // account and index will be shown in the device. // diff --git a/schema/appdata/mux.go b/schema/appdata/mux.go index 81a4fa795db8..c7b60d631717 100644 --- a/schema/appdata/mux.go +++ b/schema/appdata/mux.go @@ -138,8 +138,8 @@ func ListenerMux(listeners ...Listener) Listener { } mux.onBatch = func(batch PacketBatch) error { - for _, listener := range listeners { - err := batch.apply(&listener) + for i := range listeners { + err := batch.apply(&listeners[i]) if err != nil { return err } diff --git a/server/v2/cometbft/query.go b/server/v2/cometbft/query.go index 0bdb9e40f060..ac8e0927bd81 100644 --- a/server/v2/cometbft/query.go +++ b/server/v2/cometbft/query.go @@ -29,6 +29,7 @@ func (c *consensus[T]) handleQueryP2P(path []string) (*abci.QueryResponse, error return c.idPeerFilter(arg) } } + return &abci.QueryResponse{}, nil } return nil, errorsmod.Wrap(cometerrors.ErrUnknownRequest, "expected second parameter to be 'filter'") diff --git a/store/cache/cache.go b/store/cache/cache.go index 748eae8c422b..787e34da20ea 100644 --- a/store/cache/cache.go +++ b/store/cache/cache.go @@ -84,9 +84,7 @@ func (cmgr *CommitKVStoreCacheManager) Reset() { // Clear the map. // Please note that we are purposefully using the map clearing idiom. // See https://github.com/cosmos/cosmos-sdk/issues/6681. - for key := range cmgr.caches { - delete(cmgr.caches, key) - } + clear(cmgr.caches) } // CacheWrap implements the CacheWrapper interface