mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +02:00
tests: Avoid copies of CTransaction
This commit is contained in:
@@ -123,7 +123,7 @@ TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST)
|
||||
{
|
||||
std::vector<CMutableTransaction> noTxns;
|
||||
CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey);
|
||||
coinbaseTxns.push_back(*b.vtx[0]);
|
||||
m_coinbase_txns.push_back(b.vtx[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,12 +164,12 @@ TestChain100Setup::~TestChain100Setup()
|
||||
|
||||
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx) {
|
||||
CTransaction txn(tx);
|
||||
return FromTx(txn);
|
||||
return FromTx(MakeTransactionRef(tx));
|
||||
}
|
||||
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn) {
|
||||
return CTxMemPoolEntry(MakeTransactionRef(txn), nFee, nTime, nHeight,
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef& tx)
|
||||
{
|
||||
return CTxMemPoolEntry(tx, nFee, nTime, nHeight,
|
||||
spendsCoinbase, sigOpCost, lp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user