-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Fix issue with conflicted mempool tx in listsinceblock #8757
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
Conversation
|
Just to clarify:
Does this hide all wtxs that are conflicts, or just wtxs that conflict before block x (when you're filtering for transactions since block x)? (Because I am, and know other people currently relying on |
|
I think it would help to add some tests for this. |
|
@FrozenPrincess: this PR just hides all wallet transactions that are unconfirmed and not in your mempool (very likely conflicted). |
In that case, I'm strongly against this change of behavior. Currently if you have a service that processes bitcoin payments, you just need to run a loop (pseudo code): But if you change the behavior to filter out the conflicted transactions -- you will silently break peoples (including my) logic for knowing when they've been double-spent against. This is especially important now with bip125 |
|
I think this should be closed in favor of #10470, which I believe fixes it properly =) |
|
Closing in favor of #10470 |
436ad43 Fix issue with conflicted mempool tx in listsinceblock (Adam Jonas) Pull request description: Closes #8752 by bringing back abandoned #10470. This now checks that returned transactions are not conflicting with any transactions that are filtered out by the given blockhash and add a functional test to prevent this in the future. For more context, #8757 was closed in favor of #10470. ACKs for top commit: instagibbs: utACK 436ad43 kallewoof: utACK 436ad43 jonatack: I'm not qualifed to give an ACK here but 436ad43 appears reasonable. Built/ran tests/verified that this test fails without the change in rpcwallet.cpp: Tree-SHA512: 63d75cd3d3f19fc84dc38899b200c96179b82b24db263cd0116ee5b715265be647157855c2e35912d2fbc49c7b37db9375d6aab0ac672f0f09bece8431de5ea9
…eblock 436ad43 Fix issue with conflicted mempool tx in listsinceblock (Adam Jonas) Pull request description: Closes bitcoin#8752 by bringing back abandoned bitcoin#10470. This now checks that returned transactions are not conflicting with any transactions that are filtered out by the given blockhash and add a functional test to prevent this in the future. For more context, bitcoin#8757 was closed in favor of bitcoin#10470. ACKs for top commit: instagibbs: utACK bitcoin@436ad43 kallewoof: utACK 436ad43 jonatack: I'm not qualifed to give an ACK here but 436ad43 appears reasonable. Built/ran tests/verified that this test fails without the change in rpcwallet.cpp: Tree-SHA512: 63d75cd3d3f19fc84dc38899b200c96179b82b24db263cd0116ee5b715265be647157855c2e35912d2fbc49c7b37db9375d6aab0ac672f0f09bece8431de5ea9
…eblock 436ad43 Fix issue with conflicted mempool tx in listsinceblock (Adam Jonas) Pull request description: Closes bitcoin#8752 by bringing back abandoned bitcoin#10470. This now checks that returned transactions are not conflicting with any transactions that are filtered out by the given blockhash and add a functional test to prevent this in the future. For more context, bitcoin#8757 was closed in favor of bitcoin#10470. ACKs for top commit: instagibbs: utACK bitcoin@436ad43 kallewoof: utACK 436ad43 jonatack: I'm not qualifed to give an ACK here but 436ad43 appears reasonable. Built/ran tests/verified that this test fails without the change in rpcwallet.cpp: Tree-SHA512: 63d75cd3d3f19fc84dc38899b200c96179b82b24db263cd0116ee5b715265be647157855c2e35912d2fbc49c7b37db9375d6aab0ac672f0f09bece8431de5ea9
Attempt to fix #8752
The second parameter (target confirmation) is quite strange and should probably be better documented in the RPC help of
listsinceblock(check original comment: #199 (comment))At the moment, conflicted mempool transactions (double spends) are listed. This PR does hide all wtxs that are conflicts (GetDepthInMainChain <= -1).