mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:08:38 +00:00
test: construct miniminer_tests inputs/outputs declaratively #36923
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!36923
Loading…
Reference in a new issue
No description provided.
Delete branch "test-declarative-miniminer"
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 resize-then-assign construction of transaction inputs and outputs in the
make_txhelper ofminiminer_testswithCTxInandCTxOutctor calls.This change is test-only and does not change the constructed transactions
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.I found no actionable issues in this static review.
Reviewed:
4cddbcf534eb· Review report · Previous reportspermalink
What is the current status/progress of the project? 6-line single-commit pull requests seem a bit too small and noisy. I understand everything in one pull may not work out, but maybe next time you can combine the smaller ones?
review ACK
4cddbcf534🎛Show signature
Signature:
ACK
4cddbcf534A nice small cleanup that fits the series.
The diff is short, the transactions are unchanged. LGTM.
(I tried a couple of alternatives to make vin fully declarative. Not happy with the alternative and I think this is the best option until we get the C++23 range::to option or shim)
I don't think this needs C++23, it is possible in C++11 as well:
tx.vin = std::vector<CTxIn>{inputs.begin(), inputs.end()};, which does a reserve+moveACK 4cddbcf
Checked that the input constructor defaults match the previous initialization, and that output counts, values, scripts, and input ordering are preserved.
I've pushed test/declarative-fixture-construction on my fork, which groups three commits across nine files covering coin fixtures, transaction fixtures, and witness-commitment outputs.
@yuvicc, feel free to cherry-pick these commits into a combined PR if useful. I'll also look for other test files on upstream that still need these conversions and group those changes into further batches.