mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:50:37 +00:00
test: construct mempool_tests inputs/outputs declaratively #36694
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!36694
Loading…
Reference in a new issue
No description provided.
Delete branch "declarative-mempool"
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?
Part of #36692. This replaces the field-by-field construction of transaction inputs and outputs in
mempool_testswithCOutPoint,CTxInandCTxOutconstructor calls.It keeps
CMutableTransactionas the builder, since aCTransactionconstructor taking inputs and outputs directly is still under discussion (#36696). If one is added, thevin/voutlists here can be passed to it directly. Either way, the declarative form makes the constructed transactions easier to read.This change is test-only and does not change the constructed transactions.
The
mempool_evictionbench andrbf_testschanges from the earlier version of this PR have been dropped, as they conflict with #36521. They can follow once that is resolved.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.Conflicts
No conflicts as of last run.
No verified findings are available from this review.
Review coverage was incomplete.
Reviewed:
b7abd88f0f28· Full review report · Previous reportspermalink
nit: There is no need to type the type twice. But depending on the outcome of https://github.com/bitcoin/bitcoin/issues/36692, this may be stale anyway. Let's wait a week or two on that issue.
Also, this pull conflicts with https://github.com/bitcoin/bitcoin/pull/36521, so let's wait for that to be merged first.
Thanks. The same pattern appears ~20 times across the three files. I’d rather not mix that in and keep it focused on inputs and outputs. If #36692 settles before this PR, I would be happy to extend the PR to construct
CTransactiondirectly.@maflcko, I have dropeed the
mempool_evictionandrbf_testscommits, so this is no longer conflicts with #3651. Those can follow later.I don't think the rest needs to wait on #36692: the
vin/voutlists here are what aCTransactionconstructor would take.Let me know what you think!
ACK
b7abd88f0flgtm ACK
b7abd88f0frfm!
opened #36750 for
multisig_teststACK
b7abd88f0fThis PR improves readability of the test (imho). Have checked correctness (is it equal to the previous test).
Given this is an effort to improve tests I found a small non-blocking NIT. (Given the number of ACK's I would do this as a followup if the discussion in 36696 has been settled )
NIT: use the size of the array in the loop.