From ffd6dd51965634aa9a02e74a79b87106a8737105 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 5 Jul 2018 06:19:48 -1100 Subject: [PATCH] Fix isPoS detection --- src/komodo_bitcoind.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 2374c3262..d459678f9 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -1247,6 +1247,8 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he int32_t komodo_is_PoSblock(int32_t slowflag,int32_t height,CBlock *pblock,arith_uint256 bnTarget) { CBlockIndex *previndex; char voutaddr[64],destaddr[64]; uint256 txid; uint32_t txtime,prevtime=0; int32_t vout,txn_count,eligible,isPoS = 0; uint64_t value; CTxDestination voutaddress; + if ( ASSETCHAINS_STAKED == 100 && height < 1000 ) + return(1); txn_count = pblock->vtx.size(); if ( txn_count > 1 && pblock->vtx[txn_count-1].vin.size() == 1 && pblock->vtx[txn_count-1].vout.size() == 1 ) { @@ -1277,9 +1279,7 @@ int32_t komodo_is_PoSblock(int32_t slowflag,int32_t height,CBlock *pblock,arith_ } else fprintf(stderr,"komodo_is_PoSblock ht.%d couldnt extract voutaddress\n",height); } //else return(-1); } - fprintf(stderr,"slow.%d ht.%d isPoS.%d\n",slowflag,height,isPoS); - if ( ASSETCHAINS_STAKED == 100 && height < 1000 ) - return(1); + //fprintf(stderr,"slow.%d ht.%d isPoS.%d\n",slowflag,height,isPoS); return(isPoS); }