mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:29:40 +00:00
test, bench: construct inputs/outputs declaratively in txpackage, duplicate_inputs and p2sh tests #36788
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!36788
Loading…
Reference in a new issue
No description provided.
Delete branch "test-declarative-txpackage-p2sh"
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. Follow-up to #36750
Replaces field-by-field construction of inputs and outputs with
COutPoint,CTxInandCTxOutctor calls intxpackage_tests,bench/duplicate_inputsandscript_p2sh_tests.CMutableTransactionis kept as the builder while aCTransactionconstructor is discussed in #36696. Witnesses are still assigned aftervin, sinceCTxInhas no witness argument yet.Test-only; the constructed transactions are unchanged.
script_p2sh_tests: two outputs created byvout.resize(1)never had a value, so their nullnValue(-1) is now explicit.scriptSigswap insign, the dummy signing inValidateInputsStandardness, and the witness-only copies intxpackage_tests(mtx_child2,mtx_parent2_v2).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
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
No verified findings are available from this review.
Review coverage was incomplete.
Reviewed:
a4a2647834ad· Full review report · Previous reportspermalink
nit: Move down to make review easier?
not sure if this is meaningfully easier in this test case. Could just
vout[9] = CTxOut{1000, witnessUnknown}above to avoid the comments?What about
This would be aligned with the
/*named_arg=*/0approach recommended by the LLM linter.Great work! ACK
Maybe apply the changes recommended by the LLM linter.
Another alternative is a helper that appends an output and returns its index:
Then the spending transactions can use
sixteen_sigops_idxinstead of5.That said, any of the three approaches would be an improvement over the trailing comments, in my view.
Concept ACK
Great to see this.
Addressed some suggestions:
vout[9] = …, since indexed writes are what #36692 is trying to remove.ACK
a4a2647834Re-checked that the constructed transactions are unchanged.
ACK
a4a2647834Excellent work.
review ACK
a4a2647834👒Show signature
Signature:
ACK
a4a2647834Checked that outcomes are equal.
ACK
a4a2647834