Repository navigation
Emit mempool transactions that share a timestamp - #1177
Open
ajaysehwal wants to merge 1 commit into
Open
ajaysehwal wants to merge 1 commit into
ajaysehwal wants to merge 1 commit into
Conversation
|
I've assigned @tnull as a reviewer! |
ajaysehwal
force-pushed
the
fix-mempool-same-second-emission
branch
from
November 10, 2026 10:58
d12c5fd to
f33bb4c
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1140.
get_mempool_transactions_and_timestamp_at_heightdecided whether a mempool transaction had already been emitted only by comparing its entry time to the saved cursor. Bitcoin Core's entry times have one-second resolution, so a new transaction in the same second as an already emitted one was skipped, and stayed skipped while it was unconfirmed. The wallet then missed the unconfirmed payment until it confirmed.We now track emitted txids instead:
entry.height <= best_processed_heightcheck is unchanged).The timestamp cursor is still used for evicted-transaction timestamps, and the body cache is unchanged.
Tests: the selection logic is a separate function with unit tests for the same-second case, no repeats, lagging ancestors, eviction and re-entry, and a failed poll not being remembered. The same-second, re-entry and failed-poll tests fail with the old rule. The lib tests,
cargo +nightly fmt --checkandcargo clippy --lib -- -D clippy::unwrap_usedpass.AI disclosure: prepared with the assistance of Claude Code.