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());
// 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())