aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2016-11-11 11:57:51 -0500
committerAlex Morcos <morcos@chaincode.com>2017-01-04 12:09:33 -0500
commit84f7ab08d2e8e83a584d72fdf44f68b34baf8165 (patch)
treef5076b10d4afd783a5fb77f3a19aff1dab1fd9dd /src/test/test_bitcoin.cpp
parent60ac00de854981333656d17c9b2ea2efd1efc436 (diff)
downloadbitcoin-84f7ab08d2e8e83a584d72fdf44f68b34baf8165.tar.xz
Remove member variable hadNoDependencies from CTxMemPoolEntry
Fee estimation can just check its own mapMemPoolTxs to determine the same information. Note that now fee estimation for block processing must happen before those transactions are removed, but this shoudl be a speedup.
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 672cd11428..f0eaab2217 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -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(MakeTransactionRef(txn), nFee, nTime, dPriority, nHeight,
- hasNoDependencies, inChainValue, spendsCoinbase, sigOpCost, lp);
+ inChainValue, spendsCoinbase, sigOpCost, lp);
}
void Shutdown(void* parg)