all: fix typos in comments (#29186)
This commit is contained in:
parent
3bebabbd03
commit
cd490608e3
|
@ -242,7 +242,7 @@ func readInput(ctx *cli.Context) (*bbInput, error) {
|
||||||
if headerStr == stdinSelector || ommersStr == stdinSelector || txsStr == stdinSelector || cliqueStr == stdinSelector {
|
if headerStr == stdinSelector || ommersStr == stdinSelector || txsStr == stdinSelector || cliqueStr == stdinSelector {
|
||||||
decoder := json.NewDecoder(os.Stdin)
|
decoder := json.NewDecoder(os.Stdin)
|
||||||
if err := decoder.Decode(inputData); err != nil {
|
if err := decoder.Decode(inputData); err != nil {
|
||||||
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshaling stdin: %v", err))
|
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshalling stdin: %v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if cliqueStr != stdinSelector && cliqueStr != "" {
|
if cliqueStr != stdinSelector && cliqueStr != "" {
|
||||||
|
|
|
@ -86,7 +86,7 @@ func Transaction(ctx *cli.Context) error {
|
||||||
if txStr == stdinSelector {
|
if txStr == stdinSelector {
|
||||||
decoder := json.NewDecoder(os.Stdin)
|
decoder := json.NewDecoder(os.Stdin)
|
||||||
if err := decoder.Decode(inputData); err != nil {
|
if err := decoder.Decode(inputData); err != nil {
|
||||||
return NewError(ErrorJson, fmt.Errorf("failed unmarshaling stdin: %v", err))
|
return NewError(ErrorJson, fmt.Errorf("failed unmarshalling stdin: %v", err))
|
||||||
}
|
}
|
||||||
// Decode the body of already signed transactions
|
// Decode the body of already signed transactions
|
||||||
body = common.FromHex(inputData.TxRlp)
|
body = common.FromHex(inputData.TxRlp)
|
||||||
|
|
|
@ -135,7 +135,7 @@ func Transition(ctx *cli.Context) error {
|
||||||
if allocStr == stdinSelector || envStr == stdinSelector || txStr == stdinSelector {
|
if allocStr == stdinSelector || envStr == stdinSelector || txStr == stdinSelector {
|
||||||
decoder := json.NewDecoder(os.Stdin)
|
decoder := json.NewDecoder(os.Stdin)
|
||||||
if err := decoder.Decode(inputData); err != nil {
|
if err := decoder.Decode(inputData); err != nil {
|
||||||
return NewError(ErrorJson, fmt.Errorf("failed unmarshaling stdin: %v", err))
|
return NewError(ErrorJson, fmt.Errorf("failed unmarshalling stdin: %v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if allocStr != stdinSelector {
|
if allocStr != stdinSelector {
|
||||||
|
|
|
@ -127,7 +127,7 @@ func loadTransactions(txStr string, inputData *input, env stEnv, chainConfig *pa
|
||||||
return newRlpTxIterator(body), nil
|
return newRlpTxIterator(body), nil
|
||||||
}
|
}
|
||||||
if err := json.Unmarshal(data, &txsWithKeys); err != nil {
|
if err := json.Unmarshal(data, &txsWithKeys); err != nil {
|
||||||
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshaling txs-file: %v", err))
|
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshalling txs-file: %v", err))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if len(inputData.TxRlp) > 0 {
|
if len(inputData.TxRlp) > 0 {
|
||||||
|
|
|
@ -33,7 +33,7 @@ func readFile(path, desc string, dest interface{}) error {
|
||||||
defer inFile.Close()
|
defer inFile.Close()
|
||||||
decoder := json.NewDecoder(inFile)
|
decoder := json.NewDecoder(inFile)
|
||||||
if err := decoder.Decode(dest); err != nil {
|
if err := decoder.Decode(dest); err != nil {
|
||||||
return NewError(ErrorJson, fmt.Errorf("failed unmarshaling %s file: %v", desc, err))
|
return NewError(ErrorJson, fmt.Errorf("failed unmarshalling %s file: %v", desc, err))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ type accountMarshaling struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// storageJSON represents a 256 bit byte array, but allows less than 256 bits when
|
// storageJSON represents a 256 bit byte array, but allows less than 256 bits when
|
||||||
// unmarshaling from hex.
|
// unmarshalling from hex.
|
||||||
type storageJSON common.Hash
|
type storageJSON common.Hash
|
||||||
|
|
||||||
func (h *storageJSON) UnmarshalText(text []byte) error {
|
func (h *storageJSON) UnmarshalText(text []byte) error {
|
||||||
|
|
|
@ -343,7 +343,7 @@ func TestReceiptJSON(t *testing.T) {
|
||||||
r := Receipt{}
|
r := Receipt{}
|
||||||
err = r.UnmarshalJSON(b)
|
err = r.UnmarshalJSON(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("error unmarshaling receipt from json:", err)
|
t.Fatal("error unmarshalling receipt from json:", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ func TestEffectiveGasPriceNotRequired(t *testing.T) {
|
||||||
r2 := Receipt{}
|
r2 := Receipt{}
|
||||||
err = r2.UnmarshalJSON(b)
|
err = r2.UnmarshalJSON(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("error unmarshaling receipt from json:", err)
|
t.Fatal("error unmarshalling receipt from json:", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ type Claim [32]byte
|
||||||
var useCKZG atomic.Bool
|
var useCKZG atomic.Bool
|
||||||
|
|
||||||
// UseCKZG can be called to switch the default Go implementation of KZG to the C
|
// UseCKZG can be called to switch the default Go implementation of KZG to the C
|
||||||
// library if fo some reason the user wishes to do so (e.g. consensus bug in one
|
// library if for some reason the user wishes to do so (e.g. consensus bug in one
|
||||||
// or the other).
|
// or the other).
|
||||||
func UseCKZG(use bool) error {
|
func UseCKZG(use bool) error {
|
||||||
if use && !ckzgAvailable {
|
if use && !ckzgAvailable {
|
||||||
|
|
|
@ -357,7 +357,7 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(
|
||||||
/** Verify an ECDSA signature.
|
/** Verify an ECDSA signature.
|
||||||
*
|
*
|
||||||
* Returns: 1: correct signature
|
* Returns: 1: correct signature
|
||||||
* 0: incorrect or unparseable signature
|
* 0: incorrect or unparsable signature
|
||||||
* Args: ctx: a secp256k1 context object, initialized for verification.
|
* Args: ctx: a secp256k1 context object, initialized for verification.
|
||||||
* In: sig: the signature being verified (cannot be NULL)
|
* In: sig: the signature being verified (cannot be NULL)
|
||||||
* msg32: the 32-byte message hash being verified (cannot be NULL)
|
* msg32: the 32-byte message hash being verified (cannot be NULL)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# - A constraint describing the requirements of the law, called "require"
|
# - A constraint describing the requirements of the law, called "require"
|
||||||
# * Implementations are transliterated into functions that operate as well on
|
# * Implementations are transliterated into functions that operate as well on
|
||||||
# algebraic input points, and are called once per combination of branches
|
# algebraic input points, and are called once per combination of branches
|
||||||
# exectured. Each execution returns:
|
# executed. Each execution returns:
|
||||||
# - A constraint describing the assumptions this implementation requires
|
# - A constraint describing the assumptions this implementation requires
|
||||||
# (such as Z1=1), called "assumeFormula"
|
# (such as Z1=1), called "assumeFormula"
|
||||||
# - A constraint describing the assumptions this specific branch requires,
|
# - A constraint describing the assumptions this specific branch requires,
|
||||||
|
|
|
@ -497,7 +497,7 @@ func (h *handler) BroadcastTransactions(txs types.Transactions) {
|
||||||
}
|
}
|
||||||
// Send the transaction (if it's small enough) directly to a subset of
|
// Send the transaction (if it's small enough) directly to a subset of
|
||||||
// the peers that have not received it yet, ensuring that the flow of
|
// the peers that have not received it yet, ensuring that the flow of
|
||||||
// transactions is groupped by account to (try and) avoid nonce gaps.
|
// transactions is grouped by account to (try and) avoid nonce gaps.
|
||||||
//
|
//
|
||||||
// To do this, we hash the local enode IW with together with a peer's
|
// To do this, we hash the local enode IW with together with a peer's
|
||||||
// enode ID together with the transaction sender and broadcast if
|
// enode ID together with the transaction sender and broadcast if
|
||||||
|
|
|
@ -1502,7 +1502,7 @@ func getCodeByHash(hash common.Hash) []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// makeAccountTrieNoStorage spits out a trie, along with the leafs
|
// makeAccountTrieNoStorage spits out a trie, along with the leaves
|
||||||
func makeAccountTrieNoStorage(n int, scheme string) (string, *trie.Trie, []*kv) {
|
func makeAccountTrieNoStorage(n int, scheme string) (string, *trie.Trie, []*kv) {
|
||||||
var (
|
var (
|
||||||
db = triedb.NewDatabase(rawdb.NewMemoryDatabase(), newDbConfig(scheme))
|
db = triedb.NewDatabase(rawdb.NewMemoryDatabase(), newDbConfig(scheme))
|
||||||
|
@ -1650,7 +1650,7 @@ func makeAccountTrieWithStorageWithUniqueStorage(scheme string, accounts, slots
|
||||||
return db.Scheme(), accTrie, entries, storageTries, storageEntries
|
return db.Scheme(), accTrie, entries, storageTries, storageEntries
|
||||||
}
|
}
|
||||||
|
|
||||||
// makeAccountTrieWithStorage spits out a trie, along with the leafs
|
// makeAccountTrieWithStorage spits out a trie, along with the leaves
|
||||||
func makeAccountTrieWithStorage(scheme string, accounts, slots int, code, boundary bool, uneven bool) (*trie.Trie, []*kv, map[common.Hash]*trie.Trie, map[common.Hash][]*kv) {
|
func makeAccountTrieWithStorage(scheme string, accounts, slots int, code, boundary bool, uneven bool) (*trie.Trie, []*kv, map[common.Hash]*trie.Trie, map[common.Hash][]*kv) {
|
||||||
var (
|
var (
|
||||||
db = triedb.NewDatabase(rawdb.NewMemoryDatabase(), newDbConfig(scheme))
|
db = triedb.NewDatabase(rawdb.NewMemoryDatabase(), newDbConfig(scheme))
|
||||||
|
|
|
@ -146,7 +146,7 @@ func TestGethClient(t *testing.T) {
|
||||||
func(t *testing.T) { testCallContractWithBlockOverrides(t, client) },
|
func(t *testing.T) { testCallContractWithBlockOverrides(t, client) },
|
||||||
},
|
},
|
||||||
// The testaccesslist is a bit time-sensitive: the newTestBackend imports
|
// The testaccesslist is a bit time-sensitive: the newTestBackend imports
|
||||||
// one block. The `testAcessList` fails if the miner has not yet created a
|
// one block. The `testAccessList` fails if the miner has not yet created a
|
||||||
// new pending-block after the import event.
|
// new pending-block after the import event.
|
||||||
// Hence: this test should be last, execute the tests serially.
|
// Hence: this test should be last, execute the tests serially.
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,7 +70,7 @@ type BatchElem struct {
|
||||||
// discarded.
|
// discarded.
|
||||||
Result interface{}
|
Result interface{}
|
||||||
// Error is set if the server returns an error for this request, or if
|
// Error is set if the server returns an error for this request, or if
|
||||||
// unmarshaling into Result fails. It is not set for I/O errors.
|
// unmarshalling into Result fails. It is not set for I/O errors.
|
||||||
Error error
|
Error error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue