From 5641c3d2c5d3988f257ad4bdd8c4b3344c2bbd47 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 21 Feb 2017 09:04:55 +0200 Subject: [PATCH] Relax RT (X) test --- src/komodo_gateway.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 4a17c29c8..9176bffe1 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -655,13 +655,24 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d]\n",kmdheights[i-1],otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i); } } - if ( (height < chainActive.Tip()->nHeight || (height >= chainActive.Tip()->nHeight && komodo_isrealtime(&ht) != 0)) && matched != num ) + if ( height < 225000 && ASSETCHAINS_SYMBOL[0] == 0 ) { - printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d tip.%d isRT.%d\n",symbol,height,opcode,matched,num,(int32_t)chainActive.Tip()->nHeight,komodo_isrealtime(&ht)); - // can easily happen depending on order of loading - if ( height > 200000 ) + if ( (height < chainActive.Tip()->nHeight || (height >= chainActive.Tip()->nHeight && komodo_isrealtime(&ht) != 0)) && matched != num ) { - printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); + printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d tip.%d isRT.%d\n",symbol,height,opcode,matched,num,(int32_t)chainActive.Tip()->nHeight,komodo_isrealtime(&ht)); + // can easily happen depending on order of loading + if ( height > 200000 ) + { + printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); + return(-1); + } + } + } + else + { + if ( height < chainActive.Tip()->nHeight && matched != num ) + { + printf("REJECT %s: ht.%d (%c) matched.%d vs num.%d tip.%d isRT.%d\n",symbol,height,opcode,matched,num,(int32_t)chainActive.Tip()->nHeight,komodo_isrealtime(&ht)); return(-1); } }