mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
tidy: modernize-use-emplace
This commit is contained in:
@@ -117,7 +117,7 @@ std::shared_ptr<const CBlock> MinerTestingSetup::BadBlock(const uint256& prev_ha
|
||||
auto pblock = Block(prev_hash);
|
||||
|
||||
CMutableTransaction coinbase_spend;
|
||||
coinbase_spend.vin.push_back(CTxIn(COutPoint(pblock->vtx[0]->GetHash(), 0), CScript(), 0));
|
||||
coinbase_spend.vin.emplace_back(COutPoint(pblock->vtx[0]->GetHash(), 0), CScript(), 0);
|
||||
coinbase_spend.vout.push_back(pblock->vtx[0]->vout[0]);
|
||||
|
||||
CTransactionRef tx = MakeTransactionRef(coinbase_spend);
|
||||
@@ -245,7 +245,7 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg)
|
||||
std::vector<CTransactionRef> txs;
|
||||
for (int num_txs = 22; num_txs > 0; --num_txs) {
|
||||
CMutableTransaction mtx;
|
||||
mtx.vin.push_back(CTxIn{COutPoint{last_mined->vtx[0]->GetHash(), 1}, CScript{}});
|
||||
mtx.vin.emplace_back(COutPoint{last_mined->vtx[0]->GetHash(), 1}, CScript{});
|
||||
mtx.vin[0].scriptWitness.stack.push_back(WITNESS_STACK_ELEM_OP_TRUE);
|
||||
mtx.vout.push_back(last_mined->vtx[0]->vout[1]);
|
||||
mtx.vout[0].nValue -= 1000;
|
||||
|
||||
Reference in New Issue
Block a user