Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Lower bound priority #7008
I think this is a good compromise with regards to priority for 0.12 release. It is a calculation of priority in which only inputs that are in the chain at the time the transaction enters the mempool are aged.
It is a minimal amount of code and changes the
One caveat: In the event of a reorg, if one of the originally in-chain inputs is now no longer in chain (or has been moved to a different height) the calculation will no longer be a strict lower bound on priority because it will not take this into account.
It should be kept in mind though, that this is a clear improvement on the current calculation.
(Built on top of #7007 so the tests pass)
(EDIT: For anyone that has already reviewed #6357, this is almost a strict subset)
In any case, merging this makes other mempool related PRs more readable, it's small and it doesn't preclude the future elimination of the priority code (and there's currently no rebased version of a priority-removing PR that I know of). So even if I'm very much in favor of directly removing the priority, I would be happy to see this merged soon.
I think some squashing could be done here though, at the very least for the comment fixup commit.