diff options
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r-- | src/test/test_bitcoin.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 5c4ef5eb8c..f0eaab2217 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2015 The Bitcoin Core developers +// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -147,12 +147,11 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx, CT } CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn, CTxMemPool *pool) { - bool hasNoDependencies = pool ? pool->HasNoInputsOf(txn) : hadNoDependencies; // Hack to assume either its completely dependent on other mempool txs or not at all - CAmount inChainValue = hasNoDependencies ? txn.GetValueOut() : 0; + CAmount inChainValue = pool && pool->HasNoInputsOf(txn) ? txn.GetValueOut() : 0; - return CTxMemPoolEntry(txn, nFee, nTime, dPriority, nHeight, - hasNoDependencies, inChainValue, spendsCoinbase, sigOpCost, lp); + return CTxMemPoolEntry(MakeTransactionRef(txn), nFee, nTime, dPriority, nHeight, + inChainValue, spendsCoinbase, sigOpCost, lp); } void Shutdown(void* parg) |