mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
bench: remove unnecessary CMTxn constructors
This commit is contained in:
parent
c5c10fd317
commit
ef94d84b4e
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ static void MempoolCheckEphemeralSpends(benchmark::Bench& bench)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tx with many outputs
|
// Tx with many outputs
|
||||||
CMutableTransaction tx1 = CMutableTransaction();
|
CMutableTransaction tx1;
|
||||||
tx1.vin.resize(1);
|
tx1.vin.resize(1);
|
||||||
tx1.vout.resize(number_outputs);
|
tx1.vout.resize(number_outputs);
|
||||||
for (size_t i = 0; i < tx1.vout.size(); i++) {
|
for (size_t i = 0; i < tx1.vout.size(); i++) {
|
||||||
|
@ -55,7 +55,7 @@ static void MempoolCheckEphemeralSpends(benchmark::Bench& bench)
|
||||||
const auto& parent_txid = tx1.GetHash();
|
const auto& parent_txid = tx1.GetHash();
|
||||||
|
|
||||||
// Spends all outputs of tx1, other details don't matter
|
// Spends all outputs of tx1, other details don't matter
|
||||||
CMutableTransaction tx2 = CMutableTransaction();
|
CMutableTransaction tx2;
|
||||||
tx2.vin.resize(tx1.vout.size());
|
tx2.vin.resize(tx1.vout.size());
|
||||||
for (size_t i = 0; i < tx2.vin.size(); i++) {
|
for (size_t i = 0; i < tx2.vin.size(); i++) {
|
||||||
tx2.vin[0].prevout.hash = parent_txid;
|
tx2.vin[0].prevout.hash = parent_txid;
|
||||||
|
|
Loading…
Add table
Reference in a new issue