From 69025c5566669adef071b27a4200bae2846269d1 Mon Sep 17 00:00:00 2001 From: fudancoder <171416994+fudancoder@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:47:48 +0800 Subject: [PATCH] chore: fix some function names in comment (#23008) Signed-off-by: fudancoder --- crypto/types/multisig/multisignature.go | 2 +- math/int.go | 4 ++-- runtime/store.go | 2 +- simapp/v2/simdv2/cmd/config.go | 2 +- x/auth/migrations/legacytx/stdtx.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crypto/types/multisig/multisignature.go b/crypto/types/multisig/multisignature.go index f5aaea754ab5..f6e2b372e0cc 100644 --- a/crypto/types/multisig/multisignature.go +++ b/crypto/types/multisig/multisignature.go @@ -25,7 +25,7 @@ func NewMultisig(n int) *signing.MultiSignatureData { } } -// GetIndex returns the index of pk in keys. Returns -1 if not found +// getIndex returns the index of pk in keys. Returns -1 if not found func getIndex(pk types.PubKey, keys []types.PubKey) int { for i := 0; i < len(keys); i++ { if pk.Equals(keys[i]) { diff --git a/math/int.go b/math/int.go index d1d54c562820..12217981a40c 100644 --- a/math/int.go +++ b/math/int.go @@ -435,7 +435,7 @@ func (i *Int) UnmarshalJSON(bz []byte) error { return unmarshalJSON(i.i, bz) } -// MarshalJSON for custom encoding scheme +// marshalJSON for custom encoding scheme // Must be encoded as a string for JSON precision func marshalJSON(i encoding.TextMarshaler) ([]byte, error) { text, err := i.MarshalText() @@ -446,7 +446,7 @@ func marshalJSON(i encoding.TextMarshaler) ([]byte, error) { return json.Marshal(string(text)) } -// UnmarshalJSON for custom decoding scheme +// unmarshalJSON for custom decoding scheme // Must be encoded as a string for JSON precision func unmarshalJSON(i *big.Int, bz []byte) error { var text string diff --git a/runtime/store.go b/runtime/store.go index df2a40f06b0c..5e47731d8816 100644 --- a/runtime/store.go +++ b/runtime/store.go @@ -68,7 +68,7 @@ type coreKVStore struct { kvStore storetypes.KVStore } -// NewKVStore returns a wrapper of Core/Store kvstore interface +// newKVStore returns a wrapper of Core/Store kvstore interface func newKVStore(store storetypes.KVStore) store.KVStore { return coreKVStore{kvStore: store} } diff --git a/simapp/v2/simdv2/cmd/config.go b/simapp/v2/simdv2/cmd/config.go index ff3f7058a98e..943ac1f6b3b1 100644 --- a/simapp/v2/simdv2/cmd/config.go +++ b/simapp/v2/simdv2/cmd/config.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" ) -// initAppConfig helps to override default client config template and configs. +// initClientConfig helps to override default client config template and configs. // return "", nil if no custom configuration is required for the application. func initClientConfig() (string, interface{}) { type GasConfig struct { diff --git a/x/auth/migrations/legacytx/stdtx.go b/x/auth/migrations/legacytx/stdtx.go index 5e67518716d5..ce77424d655e 100644 --- a/x/auth/migrations/legacytx/stdtx.go +++ b/x/auth/migrations/legacytx/stdtx.go @@ -148,7 +148,7 @@ func (tx StdTx) GetSignaturesV2() ([]signing.SignatureV2, error) { return res, nil } -// GetPubkeys returns the pubkeys of signers if the pubkey is included in the signature +// GetPubKeys returns the pubkeys of signers if the pubkey is included in the signature // If pubkey is not included in the signature, then nil is in the slice instead func (tx StdTx) GetPubKeys() ([]cryptotypes.PubKey, error) { pks := make([]cryptotypes.PubKey, len(tx.Signatures))