Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comment improvement #1762

Merged
merged 2 commits into from Oct 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions mempool/mempool.go
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down