Skip to content

Commit

Permalink
all: remove the duplicate 'the' in annotations (ethereum#17509)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Jan 1, 2025
1 parent 7b9cca8 commit 35fc451
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions common/bitutil/compress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestDecodingCycle(t *testing.T) {
// TestCompression tests that compression works by returning either the bitset
// encoded input, or the actual input if the bitset version is longer.
func TestCompression(t *testing.T) {
// Check the the compression returns the bitset encoding is shorter
// Check the compression returns the bitset encoding is shorter
in := hexutil.MustDecode("0x4912385c0e7b64000000")
out := hexutil.MustDecode("0x80fe4912385c0e7b64")

Expand All @@ -132,7 +132,7 @@ func TestCompression(t *testing.T) {
if data, err := DecompressBytes(out, len(in)); err != nil || !bytes.Equal(data, in) {
t.Errorf("decoding mismatch for sparse data: have %x, want %x, error %v", data, in, err)
}
// Check the the compression returns the input if the bitset encoding is longer
// Check the compression returns the input if the bitset encoding is longer
in = hexutil.MustDecode("0xdf7070533534333636313639343638373532313536346c1bc33339343837313070706336343035336336346c65fefb3930393233383838ac2f65fefb")
out = hexutil.MustDecode("0xdf7070533534333636313639343638373532313536346c1bc33339343837313070706336343035336336346c65fefb3930393233383838ac2f65fefb")

Expand Down
4 changes: 2 additions & 2 deletions console/prompter.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type UserPrompter interface {
// choice to be made, returning that choice.
PromptConfirm(prompt string) (bool, error)

// SetHistory sets the the input scrollback history that the prompter will allow
// SetHistory sets the input scrollback history that the prompter will allow
// the user to scroll back to.
SetHistory(history []string)

Expand Down Expand Up @@ -149,7 +149,7 @@ func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) {
return false, err
}

// SetHistory sets the the input scrollback history that the prompter will allow
// SetHistory sets the input scrollback history that the prompter will allow
// the user to scroll back to.
func (p *terminalPrompter) SetHistory(history []string) {
p.State.ReadHistory(strings.NewReader(strings.Join(history, "\n")))
Expand Down
2 changes: 1 addition & 1 deletion core/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewBlockValidator(config *params.ChainConfig, blockchain *BlockChain, engin
return validator
}

// ValidateBody validates the given block's uncles and verifies the the block
// ValidateBody validates the given block's uncles and verifies the block
// header's transaction and uncle roots. The headers are assumed to be already
// validated at this point.
func (v *BlockValidator) ValidateBody(block *types.Block) error {
Expand Down
4 changes: 2 additions & 2 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, tra
allLogs []*types.Log
gp = new(GasPool).AddGas(block.GasLimit())
)
// Mutate the the block and state according to any hard-fork specs
// Mutate the block and state according to any hard-fork specs
if p.config.DAOForkSupport && p.config.DAOForkBlock != nil && p.config.DAOForkBlock.Cmp(block.Number()) == 0 {
misc.ApplyDAOHardFork(statedb)
}
Expand Down Expand Up @@ -148,7 +148,7 @@ func (p *StateProcessor) ProcessBlockNoValidator(cBlock *CalculatedBlock, stated
allLogs []*types.Log
gp = new(GasPool).AddGas(block.GasLimit())
)
// Mutate the the block and state according to any hard-fork specs
// Mutate the block and state according to any hard-fork specs
if p.config.DAOForkSupport && p.config.DAOForkBlock != nil && p.config.DAOForkBlock.Cmp(block.Number()) == 0 {
misc.ApplyDAOHardFork(statedb)
}
Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest,
for _, header := range request.Headers {
taskQueue.(*prque.Prque[int64, *types.Header]).Push(header, -int64(header.Number.Uint64()))
}
// Add the peer to the expiry report along the the number of failed requests
// Add the peer to the expiry report along the number of failed requests
expiries[id] = len(request.Headers)
}
}
Expand Down
2 changes: 1 addition & 1 deletion eth/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (f *Fetcher) Notify(peer string, hash common.Hash, number uint64, time time
}
}

// Enqueue tries to fill gaps the the fetcher's future import queue.
// Enqueue tries to fill gaps the fetcher's future import queue.
func (f *Fetcher) Enqueue(peer string, block *types.Block) error {
op := &inject{
origin: peer,
Expand Down
2 changes: 1 addition & 1 deletion node/rpcstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func newGzipHandler(next http.Handler) http.Handler {
}

// NewWebsocketUpgradeHandler returns a websocket handler that serves an incoming request only if it contains an upgrade
// request to the websocket protocol. If not, serves the the request with the http handler.
// request to the websocket protocol. If not, serves the request with the http handler.
func NewWebsocketUpgradeHandler(h http.Handler, ws http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if isWebsocket(r) {
Expand Down
2 changes: 1 addition & 1 deletion p2p/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type Config struct {
// Disabling is useful for protocol debugging (manual topology).
NoDiscovery bool

// DiscoveryV5 specifies whether the the new topic-discovery based V5 discovery
// DiscoveryV5 specifies whether the new topic-discovery based V5 discovery
// protocol should be started or not.
DiscoveryV5 bool `toml:",omitempty"`

Expand Down

0 comments on commit 35fc451

Please sign in to comment.