From dce00079c474b7e1f8d334c4fd43528ebfc73865 Mon Sep 17 00:00:00 2001 From: BiKangNing <164312726+depthlending@users.noreply.github.com> Date: Tue, 26 Mar 2024 08:10:46 +0800 Subject: [PATCH] Remove redundant words (#2100) * Remove redundant words Signed-off-by: depthlending * Fix copyright year --------- Signed-off-by: depthlending Co-authored-by: jangko --- fluffy/network/wire/portal_protocol.nim | 2 +- nimbus/core/clique.nim | 4 ++-- nimbus/core/clique/clique_genvote.nim | 2 +- nimbus/sync/protocol/les/flow_control.nim | 4 ++-- nimbus/sync/snap/worker/db/hexary_envelope.nim | 2 +- tests/test_clique/voter_samples.nim | 4 ++-- tests/test_txpool.nim | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fluffy/network/wire/portal_protocol.nim b/fluffy/network/wire/portal_protocol.nim index e5569fa13..ed55ac2f3 100644 --- a/fluffy/network/wire/portal_protocol.nim +++ b/fluffy/network/wire/portal_protocol.nim @@ -797,7 +797,7 @@ func getMaxOfferedContentKeys*(protocolIdLen: uint32, maxKeySize: uint32): int = # To calculate how much bytes, `n` content keys of size `maxKeySize` will take # we can use following equation: # bytes = (n * (maxKeySize + perContentKeyOverhead)) + offerMessageOverhead - # to calculate maximal number of keys which will will given space this can be + # to calculate maximal number of keys which will given space this can be # transformed to: # n = trunc((bytes - offerMessageOverhead) / (maxKeySize + perContentKeyOverhead)) return ((maxTalkReqPayload - 5) div (int(maxKeySize) + 4)) diff --git a/nimbus/core/clique.nim b/nimbus/core/clique.nim index 31ef3a42a..ba480f7b0 100644 --- a/nimbus/core/clique.nim +++ b/nimbus/core/clique.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018 Status Research & Development GmbH +# Copyright (c) 2018-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -35,7 +35,7 @@ export type CliqueState* = ##\ ## Descriptor state snapshot which can be used for implementing - ## transaction trasnaction handling. Nore the the `Snapshot` type + ## transaction trasnaction handling. Nore the `Snapshot` type ## inside the `Result[]` is most probably opaque. Result[Snapshot,void] diff --git a/nimbus/core/clique/clique_genvote.nim b/nimbus/core/clique/clique_genvote.nim index 908cba783..dca2e9e28 100644 --- a/nimbus/core/clique/clique_genvote.nim +++ b/nimbus/core/clique/clique_genvote.nim @@ -163,7 +163,7 @@ proc cliqueGenvote*( checkPoint: seq[EthAddress] = @[]): BlockHeader {.gcsafe, raises: [CatchableError].} = ## Variant of `clique_genvote()` where the `parent` is the canonical head - ## on the the block chain database. + ## on the block chain database. ## ## Trivial example (aka smoke test): ## diff --git a/nimbus/sync/protocol/les/flow_control.nim b/nimbus/sync/protocol/les/flow_control.nim index 1ebfe2598..69787d1b5 100644 --- a/nimbus/sync/protocol/les/flow_control.nim +++ b/nimbus/sync/protocol/les/flow_control.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018-2023 Status Research & Development GmbH +# Copyright (c) 2018-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -411,7 +411,7 @@ when defined(testing): # check newError < error error = newError - # After enough samples we should be very close the the final result + # After enough samples we should be very close the final result check error < (expectedFinalCost * 0.02) performTest(1, 10, 5.0, 100.0) diff --git a/nimbus/sync/snap/worker/db/hexary_envelope.nim b/nimbus/sync/snap/worker/db/hexary_envelope.nim index ddb9773d0..5388fc373 100644 --- a/nimbus/sync/snap/worker/db/hexary_envelope.nim +++ b/nimbus/sync/snap/worker/db/hexary_envelope.nim @@ -534,7 +534,7 @@ proc hexaryEnvelopeDecompose*( if touched.chunks == 0: return err(DecomposeDisjunct) - # Decompose the the complement of the `node` envelope off `iv` into + # Decompose the complement of the `node` envelope off `iv` into # envelopes/sub-tries. let startNode = NodeSpecs(partialPath: partialPath) diff --git a/tests/test_clique/voter_samples.nim b/tests/test_clique/voter_samples.nim index db154d653..218928137 100644 --- a/tests/test_clique/voter_samples.nim +++ b/tests/test_clique/voter_samples.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2021-2023 Status Research & Development GmbH +# Copyright (c) 2021-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -39,7 +39,7 @@ type ## addresses in turn (no pun intended) depend on the private keys of ## these accounts. Now, the private keys are generated on-the-fly by a ## PRNG which re-seeded the same for each test. So the sort order is - ## predictable and the correct value of the the `noTurn` flag can be set + ## predictable and the correct value of the `noTurn` flag can be set ## by sort of experimenting with the tests (and/or refering to earlier ## woking test specs.) diff --git a/tests/test_txpool.nim b/tests/test_txpool.nim index f463f918d..21c2b59ce 100644 --- a/tests/test_txpool.nim +++ b/tests/test_txpool.nim @@ -54,7 +54,7 @@ const deletedItemsRatioBandPC = 95 # With a large enough block size, decreasing it should not decrease the - # profitability (very much) as the the number of blocks availabe increases + # profitability (very much) as the number of blocks availabe increases # (and a better choice might be available?) A good value for the next # parameter should be above 100%. decreasingBlockProfitRatioPC = 92