Skip to content

Commit

Permalink
bench: remove unnecessary CMTxn constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Nov 20, 2024
1 parent c5c10fd commit ef94d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bench/mempool_ephemeral_spends.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void MempoolCheckEphemeralSpends(benchmark::Bench& bench)
}

// Tx with many outputs
CMutableTransaction tx1 = CMutableTransaction();
CMutableTransaction tx1;
tx1.vin.resize(1);
tx1.vout.resize(number_outputs);
for (size_t i = 0; i < tx1.vout.size(); i++) {
Expand All @@ -55,7 +55,7 @@ static void MempoolCheckEphemeralSpends(benchmark::Bench& bench)
const auto& parent_txid = tx1.GetHash();

// Spends all outputs of tx1, other details don't matter
CMutableTransaction tx2 = CMutableTransaction();
CMutableTransaction tx2;
tx2.vin.resize(tx1.vout.size());
for (size_t i = 0; i < tx2.vin.size(); i++) {
tx2.vin[0].prevout.hash = parent_txid;
Expand Down

0 comments on commit ef94d84

Please sign in to comment.