Reorg ccdata

This commit is contained in:
jl777
2018-04-12 20:13:36 +03:00
parent 816d95d586
commit dfd07d7878
3 changed files with 28 additions and 1 deletions

View File

@@ -797,7 +797,11 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
else
{
if ( pindex->nHeight != hwmheight )
{
printf("%s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight);
komodo_purge_ccdata((int32_t)pindex->nHeight);
hwmheight = pindex->nHeight;
}
komodo_event_rewind(sp,symbol,pindex->nHeight);
komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0,zero,0);
}