mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
test: make tx_mempool_block_doublespend cases independent #36830
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36830
Loading…
Reference in a new issue
No description provided.
Delete branch "split-txvalidationcache_tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during #36692: remove test state that is shared and modified across cases.
tx_mempool_block_doublespendran four cases against one chain and mempool, removing each case’s mempool transaction by hand before the next one. Each case is now its own test with a fresh setup that builds the two spends. The first commit also fixes the last case’s comment, which had the mempool and block spends reversed. The checks are unchanged.The second commit makes the two spends distinct transactions. Previously they were identical (deterministic signing), so in the last case the mempool transaction was removed because it was mined rather than as a conflict. The rejection cases are unaffected: they fail with
bad-txns-inputs-missingorspenteither way.The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.No verified findings are available from this review.
Review coverage was incomplete.
Reviewed:
0d98c438ebc1· Review report · Previous reportspermalink
cr-ACK
19bb40c987Verified that the checks match.
Maybe we can use the helper already provided by
setup_common.h:CreateValidMempoolTransaction()instead of creating by hand? this would drop the const-ness but is that a problem?the last case could assert more: something like
spends[0]andspends[1]have different hashes? Also, there is typo in commit messagedeterminitsic->deterministicin second commit.Good idea, but
CreateValidMempoolTransactionbuilds the transactions slightly differently (version 2 and an RBF nSequence instead of version 1 and final), so it would change the test’s transactions, while the first commit should be a pure refactoring. I’d prefer to keepMakeSpendhere - at least for now.Taken - thanks!
lgtm ACK
0d98c438ebsignature
ACK
0d98c438ebLGTM, small comment NIT but very minor.
Small NIT: Maybe make the (new) distinctness more explicit in the comment.
review ACK
0d98c438eb🏉Show signature
Signature: