Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/rpcnestedtests.cpp
Show All 40 Lines | void RPCNestedTests::rpcNestedTests() { | ||||
tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]); | tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]); | ||||
ClearDatadirCache(); | ClearDatadirCache(); | ||||
std::string path = | std::string path = | ||||
QDir::tempPath().toStdString() + "/" + | QDir::tempPath().toStdString() + "/" + | ||||
strprintf("test_bitcoin_qt_%lu_%i", (unsigned long)GetTime(), | strprintf("test_bitcoin_qt_%lu_%i", (unsigned long)GetTime(), | ||||
(int)(GetRand(100000))); | (int)(GetRand(100000))); | ||||
QDir dir(QString::fromStdString(path)); | QDir dir(QString::fromStdString(path)); | ||||
dir.mkpath("."); | dir.mkpath("."); | ||||
ForceSetArg("-datadir", path); | gArgs.ForceSetArg("-datadir", path); | ||||
// mempool.setSanityCheck(1.0); | // mempool.setSanityCheck(1.0); | ||||
pblocktree = new CBlockTreeDB(1 << 20, true); | pblocktree = new CBlockTreeDB(1 << 20, true); | ||||
pcoinsdbview = new CCoinsViewDB(1 << 23, true); | pcoinsdbview = new CCoinsViewDB(1 << 23, true); | ||||
pcoinsTip = new CCoinsViewCache(pcoinsdbview); | pcoinsTip = new CCoinsViewCache(pcoinsdbview); | ||||
InitBlockIndex(config); | InitBlockIndex(config); | ||||
{ | { | ||||
CValidationState state; | CValidationState state; | ||||
bool ok = ActivateBestChain(config, state); | bool ok = ActivateBestChain(config, state); | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |