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.
|
// the transaction pool.
|
||||||
for _, tx := range block.Transactions()[1:] {
|
for _, tx := range block.Transactions()[1:] {
|
||||||
_, err := b.server.txMemPool.MaybeAcceptTransaction(tx,
|
_, err := b.server.txMemPool.MaybeAcceptTransaction(tx,
|
||||||
false, true)
|
false, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Remove the transaction and all transactions
|
// Remove the transaction and all transactions
|
||||||
// that depend on it if it wasn't accepted into
|
// 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
|
// Require that free transactions have sufficient priority to be mined
|
||||||
// in the next block.
|
// in the next block. Transactions which are being added back to the
|
||||||
if !cfg.NoRelayPriority && txFee < minFee {
|
// memory pool from blocks that have been disconnected during a reorg
|
||||||
|
// are exempted.
|
||||||
|
if isNew && !cfg.NoRelayPriority && txFee < minFee {
|
||||||
txD := &TxDesc{
|
txD := &TxDesc{
|
||||||
Tx: tx,
|
Tx: tx,
|
||||||
Added: time.Now(),
|
Added: time.Now(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue