docs: fix typos in comments / code (#25017)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
parent
f8daf8b371
commit
1debb23bef
@ -12,7 +12,7 @@ import (
|
||||
"cosmossdk.io/core/coins"
|
||||
)
|
||||
|
||||
// coinsJsonTest is the type of test cases in the coin.json file.
|
||||
// coinsJSONTest is the type of test cases in the coin.json file.
|
||||
type coinJSONTest struct {
|
||||
Proto *basev1beta1.Coin
|
||||
Metadata *bankv1beta1.Metadata
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package ed25519
|
||||
|
||||
/*
|
||||
This package contains a wrapper around crypto/ed22519 to make it comply with the crypto interfaces.
|
||||
This package contains a wrapper around crypto/ed25519 to make it comply with the crypto interfaces.
|
||||
|
||||
This package employs zip215 rules. We use https://github.com/hdevalence/ed25519consensus verification function. This is done in order to keep compatibility with Tendermints ed25519 implementation.
|
||||
- https://github.com/cometbft/cometbft/v2/blob/master/crypto/ed25519/ed25519.go#L155
|
||||
|
||||
@ -22,7 +22,7 @@ import (
|
||||
const (
|
||||
PrivKeyName = "tendermint/PrivKeyEd25519"
|
||||
PubKeyName = "tendermint/PubKeyEd25519"
|
||||
// PubKeySize is is the size, in bytes, of public keys as used in this package.
|
||||
// PubKeySize is the size, in bytes, of public keys as used in this package.
|
||||
PubKeySize = 32
|
||||
// PrivKeySize is the size, in bytes, of private keys as used in this package.
|
||||
PrivKeySize = 64
|
||||
|
||||
@ -49,7 +49,7 @@ func randSig() []byte {
|
||||
}
|
||||
|
||||
// tests for malleability
|
||||
// highest bit of signature ECDSA s value must be 0, in the 33th byte
|
||||
// highest bit of signature ECDSA s value must be 0, in the 33rd byte
|
||||
func compactSigCheck(t *testing.T, sig []byte) {
|
||||
b := int(sig[32])
|
||||
if b < 0 {
|
||||
|
||||
@ -99,7 +99,7 @@ func genPrivKey(rand io.Reader) []byte {
|
||||
}
|
||||
|
||||
d.SetBytes(privKeyBytes[:])
|
||||
// break if we found a valid point (i.e. > 0 and < N == curverOrder)
|
||||
// break if we found a valid point (i.e. > 0 and < N == curveOrder)
|
||||
isValidFieldElement := 0 < d.Sign() && d.Cmp(secp256k1.S256().N) < 0
|
||||
if isValidFieldElement {
|
||||
break
|
||||
|
||||
@ -238,7 +238,7 @@ func TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGenPrivKeyFromSecret(t *testing.T) {
|
||||
// curve oder N
|
||||
// curve order N
|
||||
N := secp.S256().N
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
@ -54,7 +54,7 @@ func FileLogger(filename string) DebugOption {
|
||||
}
|
||||
|
||||
// Visualizer creates an option which provides a visualizer function which
|
||||
// will receive a rendering of the container in the Graphiz DOT format
|
||||
// will receive a rendering of the container in the Graphviz DOT format
|
||||
// whenever the container finishes building or fails due to an error. The
|
||||
// graph is color-coded to aid debugging with black representing success,
|
||||
// red representing an error, and gray representing unused types or functions.
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"cosmossdk.io/depinject/internal/graphviz"
|
||||
)
|
||||
|
||||
// ManyPerContainerType marks a type which automatically gets grouped together. For an ManyPerContainerType T,
|
||||
// ManyPerContainerType marks a type which automatically gets grouped together. For a ManyPerContainerType T,
|
||||
// T and []T can be declared as output parameters for providers as many times within the container
|
||||
// as desired. All of the provided values for T can be retrieved by declaring an
|
||||
// []T input parameter.
|
||||
|
||||
@ -122,7 +122,7 @@ In `EndBlock` (which runs for every block) we continuously check and prune the e
|
||||
https://github.com/cosmos/cosmos-sdk/blob/5f4ddc6f80f9707320eec42182184207fff3833a/x/authz/keeper/keeper.go#L378-L403
|
||||
```
|
||||
|
||||
* GrantQueue: `0x02 | expiration_bytes | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes -> ProtocalBuffer(GrantQueueItem)`
|
||||
* GrantQueue: `0x02 | expiration_bytes | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes -> ProtocolBuffer(GrantQueueItem)`
|
||||
|
||||
The `expiration_bytes` are the expiration date in UTC with the format `"2006-01-02T15:04:05.000000000"`.
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ func TestBalanceKeysMigration(t *testing.T) {
|
||||
fooBarBz, err := encCfg.Codec.Marshal(&fooBarCoin)
|
||||
require.NoError(t, err)
|
||||
store.Set(oldKeyFooBar, fooBarBz)
|
||||
require.NotNil(t, store.Get(oldKeyFooBar)) // before store migation zero values can also exist in store.
|
||||
require.NotNil(t, store.Get(oldKeyFooBar)) // before store migration zero values can also exist in store.
|
||||
|
||||
err = v2bank.MigrateStore(ctx, storeService, encCfg.Codec)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// TODO: Revisit this once we have propoer gas fee framework.
|
||||
// TODO: Revisit this once we have proper gas fee framework.
|
||||
// Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054, https://github.com/cosmos/cosmos-sdk/discussions/9072
|
||||
const (
|
||||
gasCostPerIteration = uint64(10)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user