Implement helper class for CTxMemPoolEntry constructor

This is only for unit tests.
This commit is contained in:
Alex Morcos
2015-11-14 17:04:15 -05:00
committed by Jack Grigg
parent 934fd19744
commit f41775b2c8
5 changed files with 68 additions and 28 deletions

View File

@@ -12,6 +12,7 @@
#include "main.h"
#include "random.h"
#include "txdb.h"
#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
#ifdef ENABLE_WALLET
@@ -102,6 +103,12 @@ TestingSetup::~TestingSetup()
boost::filesystem::remove_all(pathTemp);
}
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CMutableTransaction &tx, CTxMemPool *pool) {
return CTxMemPoolEntry(tx, nFee, nTime, dPriority, nHeight,
pool ? pool->HasNoInputsOf(tx) : hadNoDependencies);
}
void Shutdown(void* parg)
{
exit(0);