test suite for replacementPool

This commit is contained in:
Scott Sadler
2018-03-12 01:57:35 -03:00
parent 346eb4ae25
commit a8acafb354
12 changed files with 603 additions and 71 deletions

View File

@@ -206,8 +206,13 @@ UniValue generate(const UniValue& params, bool fHelp)
UniValue blockHashes(UniValue::VARR);
unsigned int n = Params().EquihashN();
unsigned int k = Params().EquihashK();
uint64_t lastTime = 0;
while (nHeight < nHeightEnd)
{
// Validation may fail if block generation is too fast
if (GetTime() == lastTime) MilliSleep(1001);
lastTime = GetTime();
#ifdef ENABLE_WALLET
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
#else