Fix komodo_ensure
This commit is contained in:
@@ -1772,7 +1772,7 @@ void komodo_passport_iteration()
|
||||
if ( expired == 0 && KOMODO_PASSPORT_INITDONE == 0 )
|
||||
{
|
||||
KOMODO_PASSPORT_INITDONE = 1;
|
||||
printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid);
|
||||
printf("READY for RPC calls at %u! done PASSPORT %s refid.%d\n",(uint32_t)time(NULL),ASSETCHAINS_SYMBOL,refid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4001,6 +4001,8 @@ CBlockIndex *komodo_ensure(CBlock *pblock,uint256 hash)
|
||||
if ( miSelf == mapBlockIndex.end() )
|
||||
previndex = InsertBlockIndex(pblock->hashPrevBlock);
|
||||
if ( (miSelf= mapBlockIndex.find(pblock->hashPrevBlock)) != mapBlockIndex.end() )
|
||||
{
|
||||
if ( miSelf->second == 0 ) // create pindex so first Accept block doesnt fail
|
||||
{
|
||||
if ( previndex == 0 )
|
||||
previndex = InsertBlockIndex(pblock->hashPrevBlock);
|
||||
@@ -4009,6 +4011,7 @@ CBlockIndex *komodo_ensure(CBlock *pblock,uint256 hash)
|
||||
miSelf->second = previndex;
|
||||
LogPrintf("autocreate previndex %s\n",pblock->hashPrevBlock.ToString().c_str());
|
||||
} else LogPrintf("komodo_ensure unexpected null previndex\n");
|
||||
}
|
||||
} else LogPrintf("komodo_ensure unexpected null miprev\n");
|
||||
}
|
||||
} else LogPrintf("komodo_ensure unexpected error creating pindex %s\n",hash.ToString().c_str());
|
||||
|
||||
Reference in New Issue
Block a user