0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-04 13:55:23 -05:00

bench: remove unnecessary CMTxn constructors

This commit is contained in:
Greg Sanders 2024-11-12 12:24:22 -05:00
parent c5c10fd317
commit ef94d84b4e

View file

@ -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++) {
@ -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;