diff --git a/src/miner.cpp b/src/miner.cpp index 6dd32564c..388de0ba7 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -769,7 +769,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey, int32_t nHeight, scriptPubKey = CScript() << ParseHex(NOTARY_PUBKEY) << OP_CHECKSIG; } else { - if (!isStake) + if (!isStake && ASSETCHAINS_STAKED != 0) { if (!reservekey.GetReservedKey(pubkey)) { @@ -783,13 +783,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey, int32_t nHeight, } scriptPubKey[34] = OP_CHECKSIG; } - else fprintf(stderr,"IsStake\n"); } - fprintf(stderr,"selected pubkey for new block: "); - for (i=0; i<33; i++) { - fprintf(stderr,"%02x",scriptPubKey[i+1]); - } - fprintf(stderr,"\n"); return CreateNewBlock(scriptPubKey, gpucount, isStake); } @@ -1479,7 +1473,7 @@ void static BitcoinMiner() #ifdef ENABLE_WALLET // notaries always default to staking - CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey, pindexPrev->GetHeight()+1, gpucount, 0); + CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey, pindexPrev->GetHeight()+1, gpucount, ASSETCHAINS_STAKED != 0 && GetArg("-genproclimit", 0) == 0); #else CBlockTemplate *ptr = CreateNewBlockWithKey(); #endif diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index b61ee0f6e..368f68921 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -353,6 +353,8 @@ UniValue setgenerate(const UniValue& params, bool fHelp) } else KOMODO_MININGTHREADS = (int32_t)nGenProcLimit; + fprintf(stderr, "BEFORE MAP miningthreads.%i generate.%i\n",KOMODO_MININGTHREADS,(fGenerate ? 1 : 0)); + mapArgs["-gen"] = (fGenerate ? "1" : "0"); mapArgs ["-genproclimit"] = itostr(KOMODO_MININGTHREADS);