Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin.h
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | struct TestChain100Setup : public TestingSetup { | ||||
CKey coinbaseKey; | CKey coinbaseKey; | ||||
}; | }; | ||||
class CTxMemPoolEntry; | class CTxMemPoolEntry; | ||||
class CTxMemPool; | class CTxMemPool; | ||||
struct TestMemPoolEntryHelper { | struct TestMemPoolEntryHelper { | ||||
// Default values | // Default values | ||||
CAmount nFee; | Amount nFee; | ||||
int64_t nTime; | int64_t nTime; | ||||
double dPriority; | double dPriority; | ||||
unsigned int nHeight; | unsigned int nHeight; | ||||
bool spendsCoinbase; | bool spendsCoinbase; | ||||
unsigned int sigOpCost; | unsigned int sigOpCost; | ||||
LockPoints lp; | LockPoints lp; | ||||
TestMemPoolEntryHelper() | TestMemPoolEntryHelper() | ||||
: nFee(0), nTime(0), dPriority(0.0), nHeight(1), spendsCoinbase(false), | : nFee(0), nTime(0), dPriority(0.0), nHeight(1), spendsCoinbase(false), | ||||
sigOpCost(4) {} | sigOpCost(4) {} | ||||
CTxMemPoolEntry FromTx(const CMutableTransaction &tx, | CTxMemPoolEntry FromTx(const CMutableTransaction &tx, | ||||
CTxMemPool *pool = nullptr); | CTxMemPool *pool = nullptr); | ||||
CTxMemPoolEntry FromTx(const CTransaction &tx, CTxMemPool *pool = nullptr); | CTxMemPoolEntry FromTx(const CTransaction &tx, CTxMemPool *pool = nullptr); | ||||
// Change the default value | // Change the default value | ||||
TestMemPoolEntryHelper &Fee(CAmount _fee) { | TestMemPoolEntryHelper &Fee(Amount _fee) { | ||||
nFee = _fee; | nFee = _fee; | ||||
return *this; | return *this; | ||||
} | } | ||||
TestMemPoolEntryHelper &Time(int64_t _time) { | TestMemPoolEntryHelper &Time(int64_t _time) { | ||||
nTime = _time; | nTime = _time; | ||||
return *this; | return *this; | ||||
} | } | ||||
TestMemPoolEntryHelper &Priority(double _priority) { | TestMemPoolEntryHelper &Priority(double _priority) { | ||||
Show All 17 Lines |