mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 09:41:52 +01:00
tidy: modernize-use-emplace
This commit is contained in:
@@ -36,8 +36,8 @@ static BlockTxns CreateRandomTransactions(size_t num_txns)
|
||||
CScript spk = CScript() << OP_TRUE;
|
||||
for (uint32_t i = 0; i < num_txns; ++i) {
|
||||
CMutableTransaction tx;
|
||||
tx.vin.emplace_back(CTxIn{COutPoint{prevout_hash, 0}});
|
||||
tx.vout.emplace_back(CTxOut{CENT, spk});
|
||||
tx.vin.emplace_back(COutPoint{prevout_hash, 0});
|
||||
tx.vout.emplace_back(CENT, spk);
|
||||
auto ptx{MakeTransactionRef(tx)};
|
||||
txns.emplace_back(ptx);
|
||||
prevout_hash = ptx->GetHash();
|
||||
|
||||
Reference in New Issue
Block a user