From a20de3fa836f3f06e9dd6f5fa935840686cfc044 Mon Sep 17 00:00:00 2001 From: Mihailo Milenkovic Date: Fri, 5 Jul 2019 10:41:42 +0200 Subject: [PATCH] Fix KOMODO_EARLYTXID --- src/komodo_utils.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 02bdb07ad..a4af4da6f 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -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);