-
Notifications
You must be signed in to change notification settings - Fork 36.4k
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
Fix mempool packages #6715
Merged
Merged
Fix mempool packages #6715
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdaftuar
force-pushed
the
fix-mempool-packages
branch
from
September 23, 2015 19:19
8e7d50a
to
0ddd4a3
Compare
CalculateMemPoolAncestors was always looping over a transaction's inputs to find in-mempool parents. When adding a new transaction, this is the correct behavior, but when removing a transaction, we want to use the ancestor set that would be calculated by walking mapLinks (which should in general be the same set, except during a reorg when the mempool is in an inconsistent state, and the mapLinks-based calculation would be the correct one).
sdaftuar
force-pushed
the
fix-mempool-packages
branch
from
September 23, 2015 19:38
0ddd4a3
to
60de0d5
Compare
ACK |
utACK |
Tested. Passes in a previously crashing situation. |
utACK |
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Jul 6, 2020
830eadf Solving rpc_fundrawtransaction.py amount rounding issue. (furszy) 6cf9778 ATMP: Do not try to get the inputs in zc tx. (furszy) 38efbb9 sync_blocks: Increase debugging to hunt down mempool_reorg intermittent failure (furszy) dd7855c sync_blocks: check that peer is connected when calling sync_*. (furszy) bc7d542 functional tests, sync_blocks only cleanup. (furszy) 1ae04e7 Fix mempool package tracking edge case (Suhas Daftuar) f4052aa Add test showing bug in mempool packages (furszy) 691749f rpc: Accept scientific notation for monetary amounts in JSON (furszy) b0f9051 Fix removeForReorg to use MedianTimePast (Suhas Daftuar) 92583c6 Don't call removeForReorg if DisconnectTip fails (Suhas Daftuar) bb77808 Track coinbase spends in CTxMemPoolEntry (furszy) f607f18 Change GetPriority calculation. (furszy) ac3c0f1 Remove default arguments for CTxMemPoolEntry() (furszy) 07eae9f Modify variable names for entry height and priority (furszy) 4356b31 Fix bug in mempool_tests unit test (Alex Morcos) f35ebe3 removeForReorg calls once-per-disconnect-> once-per-reorg (furszy) 7f5737f Fix comment in removeForReorg (furszy) 8ad82ca Fix removal of time-locked transactions during reorg (furszy) de74ab3 Move ProcessBlockFound reserveKey to optional. (furszy) Pull request description: More back ports and adaptations over the RPC values parsing and mempool. We need to get closer in this area :) . * bitcoin#6379 * bitcoin#6715 * bitcoin#6915 * bitcoin#7007 * bitcoin#7008 * bitcoin#12643 * bitcoin#18474 * bitcoin#18704 ACKs for top commit: Fuzzbawls: ACK 830eadf random-zebra: ACK 830eadf and merging... Tree-SHA512: 014b31008aaf09ebf838e21da59379a45565df440a77d66a0cd53e824a6d69673d6975d08243a43fb5a7ebd1a35c07d1d07412a87216b42e9d6f17a1c0bc5708
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an edge case (introduced by #6654 and reported by @sipa here: #6654 (comment)) in removing an entry from the mempool during the middle of a reorg, where the entry has an in-block ancestor which has not yet had its descendant state updated for the transaction being removed.
The first commit updates the
mempool_packages.py
rpc-test to include a test that demonstrates the bug; the second commit provides a fix.