From c2a73508a8e1670e1440e3bdd841b5ae394d3563 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 28 Mar 2019 03:53:23 -1100 Subject: [PATCH] +print --- src/komodo_gateway.h | 2 +- src/main.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d6e308229..4eee1a300 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1570,7 +1570,7 @@ int32_t komodo_opretvalidate(int32_t nHeight,CScript scriptPubKey) lag = (int32_t)(time(NULL) - pricebits[0]); fprintf(stderr,"ht.%d: t%u lag.%d %.4f USD, %.4f GBP, %.4f EUR\n",nHeight,pricebits[0],lag,(double)pricebits[1]/10000,(double)pricebits[2]/10000,(double)pricebits[3]/10000); return(0); - } + } else fprintf(stderr,"wrong size %d vs %d\n",(int32_t)vopret.size(),(int32_t)sizeof(pricebits)); return(-1); } return(0); diff --git a/src/main.cpp b/src/main.cpp index da1730696..b73a31856 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -980,16 +980,7 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in bool ContextualCheckCoinbaseTransaction(const CTransaction& tx, const int nHeight) { // if time locks are on, ensure that this coin base is time locked exactly as it should be - if ( ASSETCHAINS_MARMARA != 0 && nHeight > 0 && (nHeight & 1) == 0 ) - { - - } - else if ( ASSETCHAINS_CBOPRET != 0 && nHeight > 0 && tx.vout.size() > 0 ) - { - if ( komodo_opretvalidate(nHeight,tx.vout[tx.vout.size()-1].scriptPubKey) < 0 ) - return(false); - } - else if (((uint64_t)(tx.GetValueOut()) >= ASSETCHAINS_TIMELOCKGTE) || + if (((uint64_t)(tx.GetValueOut()) >= ASSETCHAINS_TIMELOCKGTE) || (((nHeight >= 31680) || strcmp(ASSETCHAINS_SYMBOL, "VRSC") != 0) && komodo_ac_block_subsidy(nHeight) >= ASSETCHAINS_TIMELOCKGTE)) { CScriptID scriptHash; @@ -1023,6 +1014,15 @@ bool ContextualCheckCoinbaseTransaction(const CTransaction& tx, const int nHeigh } return(false); } + else if ( ASSETCHAINS_MARMARA != 0 && nHeight > 0 && (nHeight & 1) == 0 ) + { + + } + else if ( ASSETCHAINS_CBOPRET != 0 && nHeight > 0 && tx.vout.size() > 0 ) + { + if ( komodo_opretvalidate(nHeight,tx.vout[tx.vout.size()-1].scriptPubKey) < 0 ) + return(false); + } return(true); }