Bugfix: Correctly calculate priority when inputs are mined after dependent transactions enter the memory pool #7149

wants to merge 9 commits into


None yet

5 participants

luke-jr commented Dec 1, 2015

This is needed to restore proper CreateNewBlock functioning for unconfirmed transaction chains.

@morcos morcos referenced this pull request Dec 2, 2015

Lower bound priority #7008

luke-jr commented Jan 13, 2016

Added RPC tests and fixed an additional bug found with them. This should now be ready for merging to master and 0.12.

sipa commented Jun 2, 2016

Weak concept NACK. I don't think we should be spending effort on maintaining the old priority system (which was completely arbirary anyway).

@luke-jr luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Jun 9, 2016
@luke-jr luke-jr Merge #7149 bugfix_priority fbe78b2
@luke-jr luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Jun 27, 2016
@luke-jr luke-jr Merge #7149 bugfix_priority cf9b330
morcos and others added some commits Jun 30, 2015
@morcos @luke-jr morcos Add GetStartingPriority method to reliably get the original priority …
…of a transaction in the mempool
@morcos @luke-jr morcos Change GetPriority calculation to dynamically update
Track the value of inputs that get confirmed in the chain and keep a cached value of priority at a given height and return current priority by only assuming these in chain inputs are aging.
@morcos @luke-jr morcos Add consistency check for on the fly priority calculations 98ef483
@luke-jr luke-jr QA: Add test for priority via getrawmempool 2d72888
@luke-jr luke-jr QA: Enable testing priority via getblocktemplate as well cc260ed
@luke-jr luke-jr QA: Extend txn_priority test to check across a reorganisation 6704f5b
@luke-jr luke-jr Bugfix: Correct off-by-one errors in getrawmempool startingpriority a…
…nd currentpriority

- Since the transaction arrives after block N, its starting priority is that for block N+1.
- The current priority is likewise as considered for mining the next block.
@luke-jr luke-jr Bugfix: rpc-tests/txn_priority: When connecting disconnected nodes, t…
…heir mempools may not sync, so only sync blocks
@luke-jr luke-jr CTxMemPool::check: Use height+1 for priority comparison, since height…
… is not guaranteed to work

Closing this due to inactivity.

@fanquake fanquake closed this Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment