aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_bitcoin.h')
-rw-r--r--src/test/test_bitcoin.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index f657d72038..815b227411 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -54,4 +54,29 @@ struct TestChain100Setup : public TestingSetup {
CKey coinbaseKey; // private/public key needed to spend coinbase transactions
};
+class CTxMemPoolEntry;
+class CTxMemPool;
+
+struct TestMemPoolEntryHelper
+{
+ // Default values
+ CAmount nFee;
+ int64_t nTime;
+ double dPriority;
+ unsigned int nHeight;
+ bool hadNoDependencies;
+
+ TestMemPoolEntryHelper() :
+ nFee(0), nTime(0), dPriority(0.0), nHeight(1),
+ hadNoDependencies(false) { }
+
+ CTxMemPoolEntry FromTx(CMutableTransaction &tx, CTxMemPool *pool = NULL);
+
+ // Change the default value
+ TestMemPoolEntryHelper &Fee(CAmount _fee) { nFee = _fee; return *this; }
+ TestMemPoolEntryHelper &Time(int64_t _time) { nTime = _time; return *this; }
+ TestMemPoolEntryHelper &Priority(double _priority) { dPriority = _priority; return *this; }
+ TestMemPoolEntryHelper &Height(unsigned int _height) { nHeight = _height; return *this; }
+ TestMemPoolEntryHelper &HadNoDependencies(bool _hnd) { hadNoDependencies = _hnd; return *this; }
+};
#endif