mempool: Loosen restrictions for resurrected txns.
This modifies the recently added code which rejects free/low-fee transactions with insufficient priority to ignore resurrected transactions from disconnected blocks. It also exempts resurrected transactions from the free/low-fee rate limiting.
This commit is contained in:
parent
65eb8020d2
commit
4c53599b67
2 changed files with 5 additions and 3 deletions
|
@ -1162,7 +1162,7 @@ func (b *blockManager) handleNotifyMsg(notification *blockchain.Notification) {
|
|||
// the transaction pool.
|
||||
for _, tx := range block.Transactions()[1:] {
|
||||
_, err := b.server.txMemPool.MaybeAcceptTransaction(tx,
|
||||
false, true)
|
||||
false, false)
|
||||
if err != nil {
|
||||
// Remove the transaction and all transactions
|
||||
// that depend on it if it wasn't accepted into
|
||||
|
|
|
@ -1180,8 +1180,10 @@ func (mp *txMemPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit boo
|
|||
}
|
||||
|
||||
// Require that free transactions have sufficient priority to be mined
|
||||
// in the next block.
|
||||
if !cfg.NoRelayPriority && txFee < minFee {
|
||||
// in the next block. Transactions which are being added back to the
|
||||
// memory pool from blocks that have been disconnected during a reorg
|
||||
// are exempted.
|
||||
if isNew && !cfg.NoRelayPriority && txFee < minFee {
|
||||
txD := &TxDesc{
|
||||
Tx: tx,
|
||||
Added: time.Now(),
|
||||
|
|
Loading…
Reference in a new issue