diff --git a/resolve.sh b/resolve.sh new file mode 100755 index 000000000..548e71dee --- /dev/null +++ b/resolve.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +for f in $(git diff --name-only --diff-filter=U | cat); do + echo "Resolve conflict in $f ..." + git checkout --theirs $f +done + +for f in $(git diff --name-only --diff-filter=U | cat); do + echo "Adding file $f ..." + git add $f +done + diff --git a/src/main.cpp b/src/main.cpp index e25d6419b..f93cab2f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3367,6 +3367,16 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) { CBlock block; if (!ReadBlockFromDisk(block, pindexDelete,1)) return AbortNode(state, "Failed to read block"); + if ( ASSETCHAINS_SYMBOL[0] != 0 || pindexDelete->nHeight > 1400000 ) + { + 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();