diff --git a/cmd/devp2p/nodesetcmd.go b/cmd/devp2p/nodesetcmd.go index 848288c9c..9e689f97e 100644 --- a/cmd/devp2p/nodesetcmd.go +++ b/cmd/devp2p/nodesetcmd.go @@ -181,7 +181,7 @@ func parseFilterLimit(args []string) (int, error) { return limit, nil } -// andFilter parses node filters in args and and returns a single filter that requires all +// andFilter parses node filters in args and returns a single filter that requires all // of them to match. func andFilter(args []string) (nodeFilter, error) { checks, err := parseFilters(args) diff --git a/consensus/istanbul/backend/snapshot_test.go b/consensus/istanbul/backend/snapshot_test.go index fccf343d6..05c10fe32 100644 --- a/consensus/istanbul/backend/snapshot_test.go +++ b/consensus/istanbul/backend/snapshot_test.go @@ -226,7 +226,7 @@ func TestVoting(t *testing.T) { }, results: []string{"A", "B"}, }, { - // Cascading changes are not allowed, only the the account being voted on may change + // Cascading changes are not allowed, only the account being voted on may change validators: []string{"A", "B", "C", "D"}, votes: []testerVote{ {validator: "A", voted: "C", auth: false}, diff --git a/core/state/snapshot/generate.go b/core/state/snapshot/generate.go index 5dce01133..bee531077 100644 --- a/core/state/snapshot/generate.go +++ b/core/state/snapshot/generate.go @@ -48,13 +48,13 @@ var ( // accountCheckRange is the upper limit of the number of accounts involved in // each range check. This is a value estimated based on experience. If this // value is too large, the failure rate of range prove will increase. Otherwise - // the the value is too small, the efficiency of the state recovery will decrease. + // the value is too small, the efficiency of the state recovery will decrease. accountCheckRange = 128 // storageCheckRange is the upper limit of the number of storage slots involved // in each range check. This is a value estimated based on experience. If this // value is too large, the failure rate of range prove will increase. Otherwise - // the the value is too small, the efficiency of the state recovery will decrease. + // the value is too small, the efficiency of the state recovery will decrease. storageCheckRange = 1024 // errMissingTrie is returned if the target trie is missing while the generation diff --git a/core/state/statedb.go b/core/state/statedb.go index 2bddc3949..320354324 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1174,7 +1174,7 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (common.Hash, error) { return common.Hash{}, fmt.Errorf("Unable to link the state root to the privacy metadata root: %v", err) } // add a reference from the AccountExtraData root to the state root so that when the state root is written - // to the DB the the AccountExtraData root is also written + // to the DB the AccountExtraData root is also written s.db.TrieDB().Reference(extraDataRoot, root) } return root, err diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 401ce9372..00a34d124 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -1030,7 +1030,7 @@ func TestPrivacyMetadataIsUpdatedOnAccountReCreateWithDifferentPrivacyMetadata(t if privMetaData == nil { t.Errorf("privacy metadata should have been updated during commit") } else if privMetaData.PrivacyFlag != engine.PrivacyFlagStateValidation { - t.Errorf("privacy metadata should have StateValidation as the the privacy flag") + t.Errorf("privacy metadata should have StateValidation as the privacy flag") } } diff --git a/core/vm/contracts.go b/core/vm/contracts.go index ec6dfad4e..f73be18c2 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -983,7 +983,7 @@ func (c *bls12381MapG1) RequiredGas(input []byte) uint64 { func (c *bls12381MapG1) Run(input []byte) ([]byte, error) { // Implements EIP-2537 Map_To_G1 precompile. - // > Field-to-curve call expects `64` bytes an an input that is interpreted as a an element of the base field. + // > Field-to-curve call expects `64` bytes an input that is interpreted as a an element of the base field. // > Output of this call is `128` bytes and is G1 point following respective encoding rules. if len(input) != 64 { return nil, errBLS12381InvalidInputLength @@ -1018,7 +1018,7 @@ func (c *bls12381MapG2) RequiredGas(input []byte) uint64 { func (c *bls12381MapG2) Run(input []byte) ([]byte, error) { // Implements EIP-2537 Map_FP2_TO_G2 precompile logic. - // > Field-to-curve call expects `128` bytes an an input that is interpreted as a an element of the quadratic extension field. + // > Field-to-curve call expects `128` bytes an input that is interpreted as a an element of the quadratic extension field. // > Output of this call is `256` bytes and is G2 point following respective encoding rules. if len(input) != 128 { return nil, errBLS12381InvalidInputLength diff --git a/eth/api.go b/eth/api.go index ca9b9c42e..fd361a642 100644 --- a/eth/api.go +++ b/eth/api.go @@ -563,7 +563,7 @@ func (api *PrivateDebugAPI) getModifiedAccounts(startBlock, endBlock *types.Bloc // Quorum -// StorageRoot returns the storage root of an account on the the given (optional) block height. +// StorageRoot returns the storage root of an account on the given (optional) block height. // If block number is not given the latest block is used. func (s *PublicEthereumAPI) StorageRoot(ctx context.Context, addr common.Address, blockNr *rpc.BlockNumber) (common.Hash, error) { var ( diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go index 6bbaa2f55..47ea5ef9b 100644 --- a/eth/protocols/eth/handler.go +++ b/eth/protocols/eth/handler.go @@ -96,7 +96,7 @@ type Backend interface { // TxPool defines the methods needed by the protocol handler to serve transactions. type TxPool interface { - // Get retrieves the the transaction from the local txpool with the given hash. + // Get retrieves the transaction from the local txpool with the given hash. Get(hash common.Hash) *types.Transaction } diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 484296fe5..076aca8cf 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -130,7 +130,7 @@ func (context *chainContext) CheckAndSetPrivateState(txLogs []*types.Log, privat // End Quorum -// chainContext construts the context reader which is used by the evm for reading +// chainContext constructs the context reader which is used by the evm for reading // the necessary chain context. func (api *API) chainContext(ctx context.Context) core.ChainContext { return &chainContext{api: api, ctx: ctx} @@ -224,13 +224,13 @@ type blockTraceTask struct { statedb *state.StateDB // Intermediate state prepped for tracing block *types.Block // Block to trace the transactions from rootref common.Hash // Trie root reference held for this task - results []*txTraceResult // Trace results procudes by the task + results []*txTraceResult // Trace results produced by the task // Quorum privateStateDb *state.StateDB privateStateRepo mps.PrivateStateRepository } -// blockTraceResult represets the results of tracing a single block when an entire +// blockTraceResult represents the results of tracing a single block when an entire // chain is being traced. type blockTraceResult struct { Block hexutil.Uint64 `json:"block"` // Block number corresponding to this trace @@ -728,7 +728,7 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block } } for i, tx := range block.Transactions() { - // Prepare the trasaction for un-traced execution + // Prepare the transaction for un-traced execution var ( msg, _ = tx.AsMessage(signer) txContext = core.NewEVMTxContext(msg) @@ -942,7 +942,7 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *txTrac return nil, err } } - // Constuct the JavaScript tracer to execute with + // Construct the JavaScript tracer to execute with if tracer, err = New(*config.Tracer, txContext); err != nil { return nil, err } diff --git a/extension/api.go b/extension/api.go index f791b2ef0..2b9b4bd9d 100644 --- a/extension/api.go +++ b/extension/api.go @@ -322,7 +322,7 @@ func (api *PrivateExtensionAPI) ExtendContract(ctx context.Context, toExtend com return "", errors.New("invalid new recipient transaction manager key provided") } - // check the the intended new recipient will actually receive the extension request + // check the intended new recipient will actually receive the extension request switch len(txa.PrivateFor) { case 0: txa.PrivateFor = append(txa.PrivateFor, newRecipientPtmPublicKey) diff --git a/graphql/graphql.go b/graphql/graphql.go index 605920aee..4636345ac 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -313,7 +313,7 @@ func (g *transactionReceiptGetter) get(ctx context.Context) (*types.Receipt, err } // (Quorum) privateTransactionReceiptGetter implements receiptGetter and gets privacy precompile transaction receipts -// from the the db +// from the db type privateTransactionReceiptGetter struct { pmt *Transaction } diff --git a/les/vflux/client/serverpool.go b/les/vflux/client/serverpool.go index 44942622f..4b14e2046 100644 --- a/les/vflux/client/serverpool.go +++ b/les/vflux/client/serverpool.go @@ -44,7 +44,7 @@ const ( queryWaitStep = 1.02 // exponential multiplier of redial wait time when no value was provided by the server waitThreshold = time.Hour * 2000 // drop node if waiting time is over the threshold nodeWeightMul = 1000000 // multiplier constant for node weight calculation - nodeWeightThreshold = 100 // minimum weight for keeping a node in the the known (valuable) set + nodeWeightThreshold = 100 // minimum weight for keeping a node in the known (valuable) set minRedialWait = 10 // minimum redial wait time in seconds preNegLimit = 5 // maximum number of simultaneous pre-negotiation queries warnQueryFails = 20 // number of consecutive UDP query failures before we print a warning diff --git a/p2p/discover/v5wire/msg.go b/p2p/discover/v5wire/msg.go index 7c3686111..c04966847 100644 --- a/p2p/discover/v5wire/msg.go +++ b/p2p/discover/v5wire/msg.go @@ -84,7 +84,7 @@ type ( ReqID []byte ENRSeq uint64 ToIP net.IP // These fields should mirror the UDP envelope address of the ping - ToPort uint16 // packet, which provides a way to discover the the external address (after NAT). + ToPort uint16 // packet, which provides a way to discover the external address (after NAT). } // FINDNODE is a query for nodes in the given bucket. diff --git a/permission/core/cache_test.go b/permission/core/cache_test.go index fc7c2e25f..4a702e642 100644 --- a/permission/core/cache_test.go +++ b/permission/core/cache_test.go @@ -366,7 +366,7 @@ func TestCheckIfAdminAccount(t *testing.T) { want: true, }, { - name: "Normal account in in org", + name: "Normal account in org", args: args{Acct6}, want: false, }, diff --git a/trie/iterator.go b/trie/iterator.go index 406f216c2..654772aa1 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -275,7 +275,7 @@ func (it *nodeIterator) seek(prefix []byte) error { } } -// init initializes the the iterator. +// init initializes the iterator. func (it *nodeIterator) init() (*nodeIteratorState, error) { root := it.trie.Hash() state := &nodeIteratorState{node: it.trie.root, index: -1}