From 74fa3ad9278fed11c54686b714045e9d825cf576 Mon Sep 17 00:00:00 2001 From: ChengenH Date: Tue, 23 Apr 2024 12:22:00 +0800 Subject: [PATCH] chore: remove repetitive words --- consensus/istanbul/backend/engine.go | 2 +- consensus/istanbul/backend/message_senders.go | 2 +- consensus/istanbul/core/core.go | 2 +- consensus/istanbul/proxy/proxy_set_test.go | 2 +- core/state/snapshot/generate.go | 4 ++-- crypto/secp256k1/libsecp256k1/src/asm/field_10x26_arm.s | 2 +- docs/docs/_whisper/Diagnostic-Tool-wnode.md | 2 +- eth/protocols/eth/handler.go | 2 +- les/vflux/client/serverpool.go | 2 +- p2p/discover/v5wire/msg.go | 2 +- trie/iterator.go | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/consensus/istanbul/backend/engine.go b/consensus/istanbul/backend/engine.go index 1340fcb51e..6fb4999563 100644 --- a/consensus/istanbul/backend/engine.go +++ b/consensus/istanbul/backend/engine.go @@ -606,7 +606,7 @@ func (sb *Backend) checkIsValidSigner(chain consensus.ChainHeaderReader, header } // Seal generates a new block for the given input block with the local miner's -// seal place on top and submits it the the consensus engine. +// seal place on top and submits it the consensus engine. func (sb *Backend) Seal(chain consensus.ChainHeaderReader, block *types.Block) error { header := block.Header() diff --git a/consensus/istanbul/backend/message_senders.go b/consensus/istanbul/backend/message_senders.go index ba9876a8d9..1c571e12f4 100644 --- a/consensus/istanbul/backend/message_senders.go +++ b/consensus/istanbul/backend/message_senders.go @@ -107,7 +107,7 @@ func (sb *Backend) Gossip(payload []byte, ethMsgCode uint64) error { return sb.asyncMulticast(peersToSendMsg, payload, ethMsgCode) } -// sendMsg will asynchronously send the the Celo messages to all the peers in the destPeers param. +// sendMsg will asynchronously send the Celo messages to all the peers in the destPeers param. func (sb *Backend) asyncMulticast(destPeers map[enode.ID]consensus.Peer, payload []byte, ethMsgCode uint64) error { logger := sb.logger.New("func", "AsyncMulticastCeloMsg", "msgCode", ethMsgCode) // Istanbul was encoding messages before sending it to the peer, diff --git a/consensus/istanbul/core/core.go b/consensus/istanbul/core/core.go index 13c35ce3d7..31c014d265 100644 --- a/consensus/istanbul/core/core.go +++ b/consensus/istanbul/core/core.go @@ -573,7 +573,7 @@ func (c *core) startNewSequence() error { if headBlock.Number().Cmp(c.current.Sequence()) == 0 { logger.Trace("Moving to the next block") } else if headBlock.Number().Cmp(c.current.Sequence()) > 0 { - logger.Trace("Catching up the the head block") + logger.Trace("Catching up the head block") } else { logger.Warn("New sequence should be larger than current sequence") // TODO(Joshua): figure out if we need to wait for the next block to be mined here diff --git a/consensus/istanbul/proxy/proxy_set_test.go b/consensus/istanbul/proxy/proxy_set_test.go index ac079f02d9..ca6a8d05bc 100644 --- a/consensus/istanbul/proxy/proxy_set_test.go +++ b/consensus/istanbul/proxy/proxy_set_test.go @@ -134,7 +134,7 @@ func TestProxySet(t *testing.T) { expectedValProxyAssignments: map[common.Address]*Proxy{remoteVal0Address: proxy1, remoteVal1Address: proxy1, remoteVal2Address: proxy1}, }, - // Test the the unpeered proxy getting repeered + // Test the unpeered proxy getting repeered { setProxyPeer: map[enode.ID]consensus.Peer{proxy0ID: proxy0Peer}, expectedValProxyAssignments: map[common.Address]*Proxy{remoteVal0Address: proxy0, remoteVal1Address: proxy1, remoteVal2Address: proxy0}, diff --git a/core/state/snapshot/generate.go b/core/state/snapshot/generate.go index 2cfa9cf9ac..bf097be366 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/crypto/secp256k1/libsecp256k1/src/asm/field_10x26_arm.s b/crypto/secp256k1/libsecp256k1/src/asm/field_10x26_arm.s index 1e2d7ff961..5a9cc3ffcf 100644 --- a/crypto/secp256k1/libsecp256k1/src/asm/field_10x26_arm.s +++ b/crypto/secp256k1/libsecp256k1/src/asm/field_10x26_arm.s @@ -11,7 +11,7 @@ Note: - To avoid unnecessary loads and make use of available registers, two 'passes' have every time been interleaved, with the odd passes accumulating c' and d' - which will be added to c and d respectively in the the even passes + which will be added to c and d respectively in the even passes */ diff --git a/docs/docs/_whisper/Diagnostic-Tool-wnode.md b/docs/docs/_whisper/Diagnostic-Tool-wnode.md index 38565f4297..7bd8419bbc 100644 --- a/docs/docs/_whisper/Diagnostic-Tool-wnode.md +++ b/docs/docs/_whisper/Diagnostic-Tool-wnode.md @@ -264,4 +264,4 @@ Please enter the topic (hexadecimal): ``` You can leave the topic empty for now, in which case all the messages will be delivered, regardless of the topic. -The message should be delivered by the the Server, decrypted by the Client and displayed on the screen. +The message should be delivered by the Server, decrypted by the Client and displayed on the screen. diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go index 7950bf48d6..41c3deefd6 100644 --- a/eth/protocols/eth/handler.go +++ b/eth/protocols/eth/handler.go @@ -99,7 +99,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/les/vflux/client/serverpool.go b/les/vflux/client/serverpool.go index 1ed2ce6b35..fbed2126d5 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 39c22bf5ac..d70304998a 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/trie/iterator.go b/trie/iterator.go index 86df64f909..255f053d1d 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}