This commit is contained in:
jl777
2016-10-17 16:09:06 -03:00
parent ab714a45d0
commit 126c92b60a
2 changed files with 4 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ int32_t komodo_blockindexcheck(CBlockIndex *pindex,uint32_t *nBitsp)
int32_t komodo_blockcheck(CBlock *block,uint32_t *nBitsp)
{
CBlockIndex *bindex = new CBlockIndex(block->GetBlockHeader());
if ( bindex->nHeight <= NOTARIZED_HEIGHT )
if ( bindex != 0 && bindex->nHeight <= NOTARIZED_HEIGHT )
return(-1);
// 1 -> valid notary block, change nBits to KOMODO_MINDIFF_NBITS
// -1 -> invalid, ie, prior to notarized block