|
|
@ -2672,6 +2672,15 @@ bool static DisconnectTip(CValidationState &state) { |
|
|
|
CBlock block; |
|
|
|
if (!ReadBlockFromDisk(block, pindexDelete)) |
|
|
|
return AbortNode(state, "Failed to read block"); |
|
|
|
|
|
|
|
int32_t prevMoMheight; uint256 notarizedhash,txid; |
|
|
|
komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); |
|
|
|
if ( block.GetHash() == notarizedhash ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"DisconnectTip trying to disconnect notarized block at ht.%d\n",(int32_t)pindexDelete->nHeight); |
|
|
|
return(false); |
|
|
|
} |
|
|
|
|
|
|
|
// Apply the block atomically to the chain state.
|
|
|
|
uint256 anchorBeforeDisconnect = pcoinsTip->GetBestAnchor(); |
|
|
|
int64_t nStart = GetTimeMicros(); |
|
|
|