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
parent 87ee0e2dbc
commit e587bc3fd9
5 changed files with 89 additions and 47 deletions

View File

@@ -15,6 +15,7 @@
#include "pubkey.h"
#include "random.h"
#include "txdb.h"
#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
#ifdef ENABLE_WALLET
@@ -140,6 +141,12 @@ TestChain100Setup::~TestChain100Setup()
{
}
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);