Skip to content
Permalink
Browse files

notarization check for asset chains

  • Loading branch information...
jl777 committed Sep 17, 2018
1 parent 7fe2cd8 commit 12832b1d22add227ccd6bd8a72732d519dc6e64d
Showing with 22 additions and 0 deletions.
  1. +12 −0 resolve.sh
  2. +10 −0 src/main.cpp
@@ -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

@@ -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,&notarizedhash,&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();

0 comments on commit 12832b1

Please sign in to comment.
You can’t perform that action at this time.