Fix KOMODO_EARLYTXID

This commit is contained in:
Mihailo Milenkovic
2019-07-05 10:41:42 +02:00
parent 40eae4e382
commit a20de3fa83

View File

@@ -1787,9 +1787,10 @@ void komodo_args(char *argv0)
printf("KOMODO_REWIND %d\n",KOMODO_REWIND);
}
KOMODO_EARLYTXID = Parseuint256(GetArg("-earlytxid","0").c_str());
if (KOMODO_EARLYTXID!=zeroid && (tx_height(KOMODO_EARLYTXID)==0 || tx_height(KOMODO_EARLYTXID)>100))
CTransaction tx; uint256 blockhash;
if (KOMODO_EARLYTXID!=zeroid && myGetTransaction(KOMODO_EARLYTXID,tx,blockhash) && (mapBlockIndex[blockhash]->GetHeight() == 0 || mapBlockIndex[blockhash]->GetHeight() > 100))
{
fprintf(stderr,"earlytx can be only in first 100 blocks or does not exist\n");
fprintf(stderr,"error: earlytx can be only in first 100 blocks or tx does not exist\n");
StartShutdown();
}
ASSETCHAINS_EARLYTXIDCONTRACT = GetArg("-ac_earlytxidcontract",0);