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

bitcoin: poller: fix spend expiration from mempool, again #829

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

darosior
Copy link
Member

Always mark a spend dropped from mempool as expired if it, or a conflict spending this coin, wasn't mined. The previous logic was confused: it would only do so if a conflict was detected, but it's not the only reason for a tx to be dropped from the mempool.

@darosior darosior requested a review from jp1ac4 November 21, 2023 10:14
src/bitcoin/mod.rs Outdated Show resolved Hide resolved
Always mark a spend dropped from mempool as expired if it, or a conflict spending this coin, wasn't mined. The previous logic was confused: it would only do so if a conflict was detected, but it's not the only reason for a tx to be dropped from the mempool.
@darosior darosior force-pushed the 2311_fix_rbf_spend_again branch from 4d2a1d5 to 758a4d6 Compare November 21, 2023 10:20
@jp1ac4
Copy link
Collaborator

jp1ac4 commented Nov 21, 2023

ACK 758a4d6.

I tested with the following scenario:

A ---\	    / D
     T_1 --- 
B ---/	    \ E ----\
		     T_2
C ------------------/

Transaction T_2 spends an output from T_1. I then replaced T_1 using RBF, which also removed T_2. The spend info from coin C was cleared as expected.

@darosior darosior merged commit ed35a79 into wizardsardine:master Nov 21, 2023
@darosior darosior deleted the 2311_fix_rbf_spend_again branch November 21, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants