From a31a41d47a3787d647e1b71014db457330e29b2f Mon Sep 17 00:00:00 2001 From: dongjinlong <164888560+worrycare@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:19:50 +0800 Subject: [PATCH] chore: fix some comments (#1203) Signed-off-by: dongjinlong --- consensus/bor/valset/validator_set.go | 2 +- core/blockstm/mvhashmap_test.go | 2 +- eth/handler_eth_test.go | 2 +- internal/cli/dumpconfig.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/consensus/bor/valset/validator_set.go b/consensus/bor/valset/validator_set.go index da187ddf9d..b301470e56 100644 --- a/consensus/bor/valset/validator_set.go +++ b/consensus/bor/valset/validator_set.go @@ -435,7 +435,7 @@ func verifyUpdates(updates []*Validator, vals *ValidatorSet) (updatedTotalVoting _, val := vals.GetByAddress(address) if val == nil { - // New validator, add its voting power the the total. + // New validator, add its voting power the total. updatedTotalVotingPower += valUpdate.VotingPower numNewValidators++ } else { diff --git a/core/blockstm/mvhashmap_test.go b/core/blockstm/mvhashmap_test.go index 7ed728426c..c099165f1a 100644 --- a/core/blockstm/mvhashmap_test.go +++ b/core/blockstm/mvhashmap_test.go @@ -158,7 +158,7 @@ func TestMVHashMapBasics(t *testing.T) { mvh.Write(ap1, Version{10, 1}, valueFor(10, 1)) res = mvh.Read(ap1, 9) - require.Equal(t, -1, res.depIdx, "reads that should go the the DB return dependency -1") + require.Equal(t, -1, res.depIdx, "reads that should go the DB return dependency -1") res = mvh.Read(ap1, 10) require.Equal(t, -1, res.depIdx, "Read returns entries from smaller txns, not txn 10") diff --git a/eth/handler_eth_test.go b/eth/handler_eth_test.go index 6e36cb2a56..c44b4c9a33 100644 --- a/eth/handler_eth_test.go +++ b/eth/handler_eth_test.go @@ -488,7 +488,7 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) { ) for i, sink := range sinks { - sink := sink // Closure for gorotuine below + sink := sink // Closure for goroutine below sourcePipe, sinkPipe := p2p.MsgPipe() defer sourcePipe.Close() diff --git a/internal/cli/dumpconfig.go b/internal/cli/dumpconfig.go index f01adef628..13ef57c087 100644 --- a/internal/cli/dumpconfig.go +++ b/internal/cli/dumpconfig.go @@ -28,7 +28,7 @@ func (p *DumpconfigCommand) MarkDown() string { func (c *DumpconfigCommand) Help() string { return `Usage: bor dumpconfig - This command will will export the user provided flags into a configuration file` + This command will export the user provided flags into a configuration file` } // Synopsis implements the cli.Command interface