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

Always clean up manual transaction prioritization #6464

Merged
merged 1 commit into from Oct 27, 2015

Conversation

@casey
Copy link
Contributor

casey commented Jul 22, 2015

This fixes #4818

An alternative fix is to add the transaction prioritization information to CTxMemPoolEntry itself, instead of storing it separately. This would add 128 bits to every transaction in the mempool, which seems undesirable, given that the majority of transactions won't have a manual transaction prioritization delta.

@morcos

@jgarzik
Copy link
Contributor

jgarzik commented Jul 23, 2015

concept ACK - will review & test in depth

@luke-jr
Copy link
Member

luke-jr commented Jul 23, 2015

Prioritisations should never be removed until a transaction is mined. It's intentionally not on CTxMemPoolEntry because we may not have (or be willing to accept) the transaction until after prioritising it. Although it does make sense to remove the entry if a conflicting transaction is confirmed.

@laanwj laanwj added the Mining label Jul 24, 2015
@sipa
Copy link
Member

sipa commented Jul 24, 2015

Agree with @luke-jr. @casey can you move the remove call to CTxMemPool::removeForBlock ?

@casey
Copy link
Contributor Author

casey commented Jul 24, 2015

@luke-jr @sipa In that case, shouldn't the existing call to ClearPrioritisation in CTxMemPool::removeForBlock be left where it is, and an additional one be added to CTxMemPool::removeConflicts, to clear the priority of conflicting transactions?

@casey
Copy link
Contributor Author

casey commented Aug 3, 2015

So I think in that case it's just a simple one line change to clear prioritizations when a conflicting transaction is mined.

@sipa
Copy link
Member

sipa commented Aug 4, 2015

Seems reasonable to me.

@casey
Copy link
Contributor Author

casey commented Sep 3, 2015

@luke-jr, could you take a look and make sure that it's now doing the right thing?

@gavinandresen
Copy link
Contributor

gavinandresen commented Sep 3, 2015

Untested ACK.

@luke-jr
Copy link
Member

luke-jr commented Oct 23, 2015

Looks reasonable, utACK

@laanwj laanwj merged commit 2d8c49d into bitcoin:master Oct 27, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
laanwj added a commit that referenced this pull request Oct 27, 2015
2d8c49d Clean up tx prioritization when conflict mined (Casey Rodarmor)
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 18, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.