From 9318370908aadc628d53306450d699d2b78a2cd0 Mon Sep 17 00:00:00 2001 From: camcui Date: Fri, 12 Apr 2024 17:14:50 +0800 Subject: [PATCH] chore: remove repetitive words Signed-off-by: camcui --- app/protocol/common/common.go | 2 +- app/protocol/flowcontext/flow_context.go | 2 +- .../processes/blockprocessor/validate_and_insert_block.go | 2 +- domain/consensus/utils/txscript/engine.go | 2 +- util/internal_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/protocol/common/common.go b/app/protocol/common/common.go index e644d7efa..895915546 100644 --- a/app/protocol/common/common.go +++ b/app/protocol/common/common.go @@ -17,7 +17,7 @@ var ErrPeerWithSameIDExists = errors.New("ready peer with the same ID already ex type flowExecuteFunc func(peer *peerpkg.Peer) -// Flow is a a data structure that is used in order to associate a p2p flow to some route in a router. +// Flow is a data structure that is used in order to associate a p2p flow to some route in a router. type Flow struct { Name string ExecuteFunc flowExecuteFunc diff --git a/app/protocol/flowcontext/flow_context.go b/app/protocol/flowcontext/flow_context.go index 7ca8bf001..2ae964cf0 100644 --- a/app/protocol/flowcontext/flow_context.go +++ b/app/protocol/flowcontext/flow_context.go @@ -86,7 +86,7 @@ func New(cfg *config.Config, domain domain.Domain, addressManager *addressmanage } } -// Close signals to all flows the the protocol manager is closed. +// Close signals to all flows the protocol manager is closed. func (f *FlowContext) Close() { close(f.shutdownChan) } diff --git a/domain/consensus/processes/blockprocessor/validate_and_insert_block.go b/domain/consensus/processes/blockprocessor/validate_and_insert_block.go index 5d71d60e0..6b5b33f69 100644 --- a/domain/consensus/processes/blockprocessor/validate_and_insert_block.go +++ b/domain/consensus/processes/blockprocessor/validate_and_insert_block.go @@ -39,7 +39,7 @@ func (bp *blockProcessor) setBlockStatusAfterBlockValidation( // the block. if !isPruningPoint { return externalapi.StatusInvalid, errors.Errorf("block %s that is not the pruning point is not expected to be valid "+ - "before adding to to the consensus state manager", blockHash) + "before adding to the consensus state manager", blockHash) } log.Debugf("Block %s is the pruning point and has status %s, so leaving its status untouched", blockHash, status) diff --git a/domain/consensus/utils/txscript/engine.go b/domain/consensus/utils/txscript/engine.go index a662b3246..61888a24b 100644 --- a/domain/consensus/utils/txscript/engine.go +++ b/domain/consensus/utils/txscript/engine.go @@ -187,7 +187,7 @@ func (vm *Engine) DisasmScript(idx int) (string, error) { } // CheckErrorCondition returns nil if the running script has ended and was -// successful, leaving a a true boolean on the stack. An error otherwise, +// successful, leaving a true boolean on the stack. An error otherwise, // including if the script has not finished. func (vm *Engine) CheckErrorCondition(finalScript bool) error { // Check execution is actually done. When pc is past the end of script diff --git a/util/internal_test.go b/util/internal_test.go index 89dec921a..3a8e65658 100644 --- a/util/internal_test.go +++ b/util/internal_test.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -This test file is part of the util package rather than than the +This test file is part of the util package rather than the util_test package so it can bridge access to the internals to properly test cases which are either not possible or can't reliably be tested via the public interface. The functions are only exported while the tests are being run.