From 21d62dce1293f99b01090d4b0527de51d9e1e28d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 00:15:24 +0200 Subject: [PATCH 1/2] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 922a0a9bc..262fadb56 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -163,7 +163,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); - if ( height < 90000 || height > 110000 ) + if ( height < 90000 || (height > 110000 && KOMODO_REWIND == 0) ) return error("CheckProofOfWork(): hash doesn't match nBits"); } } From fb6c7505823ad8af32df7ac8e50ba80183448f70 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 00:22:34 +0200 Subject: [PATCH 2/2] test --- src/miner.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 94e89325a..59ef7e549 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -618,8 +618,11 @@ void static BitcoinMiner(CWallet *pwallet) arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_is_special(pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 ) { - hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS); - fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1); + if ( (Mining_height % KOMODO_ELECTION_GAP) > 64 || (Mining_height % KOMODO_ELECTION_GAP) == 0 ) + { + hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS); + fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1); + } else Mining_start = 0; } else Mining_start = 0; while (true) {