From ca124ac1ab0eee973b2b7a6afb43229309593cbd Mon Sep 17 00:00:00 2001 From: pengyonghui <421640644@qq.com> Date: Mon, 18 Oct 2021 15:11:12 +0800 Subject: [PATCH 1/2] fix typo --- mempool/mempool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mempool/mempool.go b/mempool/mempool.go index 7ada3d2907..5595a11bfe 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -1032,8 +1032,8 @@ func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejec return nil, nil, err } - // Don't allow the transaction if it exists in the main chain and is not - // not already fully spent. + // Don't allow the transaction if it exists in the main chain and is + // already fully spent. prevOut := wire.OutPoint{Hash: *txHash} for txOutIdx := range tx.MsgTx().TxOut { prevOut.Index = uint32(txOutIdx) From 71c66a437d295cd38c3d581573373ec3d212986c Mon Sep 17 00:00:00 2001 From: pengyonghui <421640644@qq.com> Date: Mon, 18 Oct 2021 15:48:51 +0800 Subject: [PATCH 2/2] fix typos --- mempool/mempool.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mempool/mempool.go b/mempool/mempool.go index 5595a11bfe..b54856c8b3 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -1054,7 +1054,7 @@ func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejec if entry == nil || entry.IsSpent() { // Must make a copy of the hash here since the iterator // is replaced and taking its address directly would - // result in all of the entries pointing to the same + // result in all the entries pointing to the same // memory location and thus all be the final hash. hashCopy := outpoint.Hash missingParents = append(missingParents, &hashCopy) @@ -1100,7 +1100,7 @@ func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejec if err != nil { // Attempt to extract a reject code from the error so // it can be retained. When not possible, fall back to - // a non standard error. + // a non-standard error. rejectCode, found := extractRejectCode(err) if !found { rejectCode = wire.RejectNonstandard @@ -1143,7 +1143,7 @@ func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejec // calculated below on its own would encourage several small // transactions to avoid fees rather than one single larger transaction // which is more desirable. Therefore, as long as the size of the - // transaction does not exceeed 1000 less than the reserved space for + // transaction does not exceed 1000 less than the reserved space for // high-priority transactions, don't require a fee for it. serializedSize := GetTxVirtualSize(tx) minFee := calcMinRequiredTxRelayFee(serializedSize, @@ -1194,7 +1194,7 @@ func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejec mp.cfg.Policy.FreeTxRelayLimit*10*1000) } - // If the transaction has any conflicts and we've made it this far, then + // If the transaction has any conflicts, and we've made it this far, then // we're processing a potential replacement. var conflicts map[chainhash.Hash]*btcutil.Tx if isReplacement { @@ -1366,7 +1366,7 @@ func (mp *TxPool) ProcessOrphans(acceptedTx *btcutil.Tx) []*TxDesc { // // It returns a slice of transactions added to the mempool. When the // error is nil, the list will include the passed transaction itself along -// with any additional orphan transaactions that were added as a result of +// with any additional orphan transactions that were added as a result of // the passed one being accepted. // // This function is safe for concurrent access. @@ -1435,7 +1435,7 @@ func (mp *TxPool) Count() int { return count } -// TxHashes returns a slice of hashes for all of the transactions in the memory +// TxHashes returns a slice of hashes for all the transactions in the memory // pool. // // This function is safe for concurrent access. @@ -1488,7 +1488,7 @@ func (mp *TxPool) MiningDescs() []*mining.TxDesc { return descs } -// RawMempoolVerbose returns all of the entries in the mempool as a fully +// RawMempoolVerbose returns all the entries in the mempool as a fully // populated btcjson result. // // This function is safe for concurrent access.