From 126b0ecff1c15a3fc365fdf77f51201ab469347a Mon Sep 17 00:00:00 2001 From: oftenoccur <166520808+oftenoccur@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:08:05 +0800 Subject: [PATCH] chore: fix some typos in comments (#2164) Signed-off-by: oftenoccur --- blockchain/fullblocktests/generate.go | 2 +- blockchain/timesorter.go | 2 +- blockchain/validate.go | 2 +- btcec/schnorr/musig2/nonces_test.go | 2 +- mempool/doc.go | 2 +- txscript/engine.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blockchain/fullblocktests/generate.go b/blockchain/fullblocktests/generate.go index fe36bfe136..e8fad241fa 100644 --- a/blockchain/fullblocktests/generate.go +++ b/blockchain/fullblocktests/generate.go @@ -608,7 +608,7 @@ func (g *testGenerator) saveTipCoinbaseOut() { } // saveSpendableCoinbaseOuts adds all coinbase outputs from the last block that -// had its coinbase tx output colleted to the current tip. This is useful to +// had its coinbase tx output collected to the current tip. This is useful to // batch the collection of coinbase outputs once the tests reach a stable point // so they don't have to manually add them for the right tests which will // ultimately end up being the best chain. diff --git a/blockchain/timesorter.go b/blockchain/timesorter.go index d0288e1d30..4a5498b258 100644 --- a/blockchain/timesorter.go +++ b/blockchain/timesorter.go @@ -20,7 +20,7 @@ func (s timeSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -// Less returns whether the timstamp with index i should sort before the +// Less returns whether the timestamp with index i should sort before the // timestamp with index j. It is part of the sort.Interface implementation. func (s timeSorter) Less(i, j int) bool { return s[i] < s[j] diff --git a/blockchain/validate.go b/blockchain/validate.go index 6c49bd565d..5e24405ef9 100644 --- a/blockchain/validate.go +++ b/blockchain/validate.go @@ -761,7 +761,7 @@ func CheckBlockHeaderContext(header *wire.BlockHeader, prevNode HeaderCtx, return nil } -// checkBlockContext peforms several validation checks on the block which depend +// checkBlockContext performs several validation checks on the block which depend // on its position within the block chain. // // The flags modify the behavior of this function as follows: diff --git a/btcec/schnorr/musig2/nonces_test.go b/btcec/schnorr/musig2/nonces_test.go index 7105d83b30..074fe7363a 100644 --- a/btcec/schnorr/musig2/nonces_test.go +++ b/btcec/schnorr/musig2/nonces_test.go @@ -111,7 +111,7 @@ type nonceAggTestCases struct { } // TestMusig2AggregateNoncesTestVectors tests that the musig2 implementation -// passes the nonce aggregration test vectors for musig2 1.0. +// passes the nonce aggregation test vectors for musig2 1.0. func TestMusig2AggregateNoncesTestVectors(t *testing.T) { t.Parallel() diff --git a/mempool/doc.go b/mempool/doc.go index 22fb2a06a0..8c6c0bc1ea 100644 --- a/mempool/doc.go +++ b/mempool/doc.go @@ -5,7 +5,7 @@ /* Package mempool provides a policy-enforced pool of unmined bitcoin transactions. -A key responsbility of the bitcoin network is mining user-generated transactions +A key responsibility of the bitcoin network is mining user-generated transactions into blocks. In order to facilitate this, the mining process relies on having a readily-available source of transactions to include in a block that is being solved. diff --git a/txscript/engine.go b/txscript/engine.go index 3725845104..d4bedc956b 100644 --- a/txscript/engine.go +++ b/txscript/engine.go @@ -450,7 +450,7 @@ func checkMinimalDataPush(op *opcode, data []byte) error { return nil } -// executeOpcode peforms execution on the passed opcode. It takes into account +// executeOpcode performs execution on the passed opcode. It takes into account // whether or not it is hidden by conditionals, but some rules still must be // tested in this case. func (vm *Engine) executeOpcode(op *opcode, data []byte) error {