Stronger check for asset chain notarizations
This commit is contained in:
@@ -3370,6 +3370,15 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) {
|
|||||||
CBlock block;
|
CBlock block;
|
||||||
if (!ReadBlockFromDisk(block, pindexDelete,1))
|
if (!ReadBlockFromDisk(block, pindexDelete,1))
|
||||||
return AbortNode(state, "Failed to read block");
|
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.
|
// Apply the block atomically to the chain state.
|
||||||
uint256 anchorBeforeDisconnect = pcoinsTip->GetBestAnchor();
|
uint256 anchorBeforeDisconnect = pcoinsTip->GetBestAnchor();
|
||||||
int64_t nStart = GetTimeMicros();
|
int64_t nStart = GetTimeMicros();
|
||||||
|
|||||||
Reference in New Issue
Block a user