diff options
| author | MarcoFalke <[email protected]> | 2018-04-11 13:51:28 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-04-11 14:59:53 -0400 |
| commit | fae58eca934b5c7165b589c3bec1751d1b432b48 (patch) | |
| tree | 5d0c8b10608dcced118dc59d7812f8498fcfc012 /src/test/test_bitcoin.cpp | |
| parent | Merge #12920: test: Fix sign for expected values (diff) | |
| download | discoin-fae58eca934b5c7165b589c3bec1751d1b432b48.tar.xz discoin-fae58eca934b5c7165b589c3bec1751d1b432b48.zip | |
tests: Avoid copies of CTransaction
Diffstat (limited to 'src/test/test_bitcoin.cpp')
| -rw-r--r-- | src/test/test_bitcoin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index ff20d4b3d..b72df1604 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -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); } |