From 1e983efa98ee6b0af87e90706e8183b192d74cfe Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 8 Nov 2016 15:00:31 -0300 Subject: [PATCH] test --- src/miner.cpp | 7 ++++--- src/pow.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index fe01410ca..bae0a2052 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -435,6 +435,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& // // Internal miner // +#define ROUNDROBIN_DELAY 10 extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY; extern std::string NOTARY_PUBKEY; extern uint8_t NOTARY_PUBKEY33[33]; @@ -621,10 +622,10 @@ void static BitcoinMiner(CWallet *pwallet) // printf("missed target\n"); return false; } - if ( ASSETCHAINS_SYMBOL[0] == 0 && Mining_start != 0 && time(NULL) < Mining_start+20 ) + if ( ASSETCHAINS_SYMBOL[0] == 0 && Mining_start != 0 && time(NULL) < Mining_start+ROUNDROBIN_DELAY ) { - printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+20-time(NULL))); - sleep(Mining_start+20-time(NULL)); + printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+ROUNDROBIN_DELAY-time(NULL))); + sleep(Mining_start+ROUNDROBIN_DELAY-time(NULL)); } // Found a solution SetThreadPriority(THREAD_PRIORITY_NORMAL); diff --git a/src/pow.cpp b/src/pow.cpp index 0a8786d74..8945a590c 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -124,7 +124,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in //fprintf(stderr," height.%d special.%d nonz.%d\n",height,special,nonz); if ( nonz == 0 ) return(true); // will come back via different path with pubkey set - else + else if ( 0 ) { for (i=0; i<33; i++) fprintf(stderr,"%02x",pubkey33[i]); @@ -146,7 +146,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in { for (i=0; i<33; i++) printf("%02x",pubkey33[i]); - printf(" special.%d notaryid.%d ht.%d mod.%d\n",special,notaryid,height,(height % 35)); + printf(" special.%d notaryid.%d ht.%d mod.%d error\n",special,notaryid,height,(height % 35)); return error("CheckProofOfWork(): hash doesn't match nBits"); } if ( flag != 0 )