]> Git Repo - VerusCoin.git/commitdiff
Fix bug rejecting identity on orphan block
authormiketout <[email protected]>
Tue, 17 Dec 2019 09:48:44 +0000 (01:48 -0800)
committermiketout <[email protected]>
Tue, 17 Dec 2019 09:48:44 +0000 (01:48 -0800)
src/main.cpp
src/pbaas/identity.cpp

index dc0c89ae0324988f6f18aa8e495e32849a155513..8b2b7fc9020c289cd22cdb2172454774b50301c9 100644 (file)
@@ -5384,7 +5384,10 @@ static bool AcceptBlockHeader(int32_t *futureblockp,const CBlockHeader& block, C
         if (ppindex)
             *ppindex = pindex;
         if ( pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK )
+        {
+            LogPrintf("block height: %u\n", pindex->GetHeight());
             return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate");
+        }
         /*if ( pindex != 0 && hash == komodo_requestedhash )
         {
             fprintf(stderr,"AddToBlockIndex A komodo_requestedhash %s\n",komodo_requestedhash.ToString().c_str());
index deeeb2fd175fa3af0657ed50d1e375da8b7314fc..e34bf0f1a118de4a712c0ddbda20efd8addb75b4 100644 (file)
@@ -498,7 +498,7 @@ bool PrecheckIdentityReservation(const CTransaction &tx, int32_t outNum, CValida
     // CHECK #3a - if dupID is valid, we need to be spending it to recover. redefinition is invalid
     CTxIn idTxIn;
     uint32_t priorHeightOut;
-    CIdentity dupID = newIdentity.LookupIdentity(newIdentity.GetID(), height, &priorHeightOut, &idTxIn);
+    CIdentity dupID = newIdentity.LookupIdentity(newIdentity.GetID(), height - 1, &priorHeightOut, &idTxIn);
 
     CCoinsViewCache view(pcoinsTip);
     if (dupID.IsValid())
This page took 0.031942 seconds and 4 git commands to generate.