aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-11-30 14:25:07 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-11-30 14:37:05 +0100
commiteb7741605b32c25893f687e19820dab114d04fe1 (patch)
tree09e5089b65342b38f0f3ed392021b091ec71f618 /src/test/test_bitcoin.cpp
parent9b8fc6c89a08db2c0aa58096e4c5c01093177c74 (diff)
parentc0353064ddf71ad103bd19f6e7c10ff8e240ac46 (diff)
Merge pull request #7008
c035306 Change GetPriority calculation. (Alex Morcos) 71f1d9f Modify variable names for entry height and priority (Alex Morcos) 5945819 Remove default arguments for CTxMemPoolEntry() (Alex Morcos)
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 2fe190f885..351870014d 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -144,8 +144,13 @@ TestChain100Setup::~TestChain100Setup()
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CMutableTransaction &tx, CTxMemPool *pool) {
- return CTxMemPoolEntry(tx, nFee, nTime, dPriority, nHeight,
- pool ? pool->HasNoInputsOf(tx) : hadNoDependencies);
+ CTransaction txn(tx);
+ bool hasNoDependencies = pool ? pool->HasNoInputsOf(tx) : hadNoDependencies;
+ // Hack to assume either its completely dependent on other mempool txs or not at all
+ CAmount inChainValue = hasNoDependencies ? txn.GetValueOut() : 0;
+
+ return CTxMemPoolEntry(txn, nFee, nTime, dPriority, nHeight,
+ hasNoDependencies, inChainValue);
}
void Shutdown(void* parg)