This commit is contained in:
jl777
2017-03-13 23:03:45 +02:00
parent 1b5b89ba20
commit d4190a2ace
2 changed files with 16 additions and 2 deletions

View File

@@ -426,7 +426,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
CValidationState state;
if ( !TestBlockValidity(state, *pblock, pindexPrev, false, false))
{
fprintf(stderr,"warning: testblockvalidity failed\n");
static uint32_t counter;
if ( counter++ < 100 )
fprintf(stderr,"warning: testblockvalidity failed\n");
return(0);
//throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed");
}
@@ -615,7 +617,7 @@ void static BitcoinMiner(CWallet *pwallet)
CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey);
if ( ptr == 0 )
{
static int32_t counter;
static uint32_t counter;
if ( counter++ < 100 )
fprintf(stderr,"created illegal block, retry\n");
continue;