aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2016-04-25 17:04:13 -0700
committerMatt Corallo <[email protected]>2016-06-19 01:34:57 -0700
commitf4f8f14adc79f71eb3cfd3a8d6dbfe9878d1e3f6 (patch)
treefb02f4cc670a389ad47495fdc4c94c73776eeba7 /src/test/test_bitcoin.cpp
parentAdd partial-block block encodings API (diff)
downloaddiscoin-f4f8f14adc79f71eb3cfd3a8d6dbfe9878d1e3f6.tar.xz
discoin-f4f8f14adc79f71eb3cfd3a8d6dbfe9878d1e3f6.zip
Add TestMemPoolEntryHelper::FromTx version for CTransaction
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index c68320ba8..199670918 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -126,7 +126,11 @@ TestChain100Setup::~TestChain100Setup()
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CMutableTransaction &tx, CTxMemPool *pool) {
CTransaction txn(tx);
- bool hasNoDependencies = pool ? pool->HasNoInputsOf(tx) : hadNoDependencies;
+ return FromTx(txn, pool);
+}
+
+CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(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;