This commit is contained in:
jl777
2019-01-13 07:16:34 -11:00
parent 6c9d66ed0d
commit db879566f5
2 changed files with 6 additions and 6 deletions

View File

@@ -1312,12 +1312,12 @@ uint32_t komodo_stake(int32_t validateflag,arith_uint256 bnTarget,int32_t nHeigh
} }
if ( validateflag != 0 ) if ( validateflag != 0 )
{ {
/*for (i=31; i>=24; i--) for (i=31; i>=24; i--)
fprintf(stderr,"%02x",((uint8_t *)&hashval)[i]); fprintf(stderr,"%02x",((uint8_t *)&hashval)[i]);
fprintf(stderr," vs "); fprintf(stderr," vs ");
for (i=31; i>=24; i--) for (i=31; i>=24; i--)
fprintf(stderr,"%02x",((uint8_t *)&bnTarget)[i]); fprintf(stderr,"%02x",((uint8_t *)&bnTarget)[i]);
fprintf(stderr," segid.%d iter.%d winner.%d coinage.%llu %d ht.%d t.%u v%d diff.%d\n",segid,iter,winner,(long long)coinage,(int32_t)(blocktime - txtime),nHeight,blocktime,(int32_t)value,(int32_t)diff);*/ fprintf(stderr," segid.%d iter.%d winner.%d coinage.%llu %d ht.%d t.%u v%d diff.%d\n",segid,iter,winner,(long long)coinage,(int32_t)(blocktime - txtime),nHeight,blocktime,(int32_t)value,(int32_t)diff);
break; break;
} }
} }
@@ -2084,7 +2084,7 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
komodo_segids(hashbuf,nHeight-101,100); komodo_segids(hashbuf,nHeight-101,100);
if ( *blocktimep < tipindex->nTime+60 ) if ( *blocktimep < tipindex->nTime+60 )
*blocktimep = tipindex->nTime+60; *blocktimep = tipindex->nTime+60;
fprintf(stderr,"Start scan of utxo for staking %u ht.%d\n",(uint32_t)time(NULL),nHeight); //fprintf(stderr,"Start scan of utxo for staking %u ht.%d\n",(uint32_t)time(NULL),nHeight);
bool resetstaker = false; bool resetstaker = false;
if ( array != 0 ) if ( array != 0 )
@@ -2140,7 +2140,7 @@ fprintf(stderr,"Start scan of utxo for staking %u ht.%d\n",(uint32_t)time(NULL),
lasttime = (uint32_t)time(NULL); lasttime = (uint32_t)time(NULL);
//fprintf(stderr,"finished kp data of utxo for staking %u ht.%d numkp.%d maxkp.%d\n",(uint32_t)time(NULL),nHeight,numkp,maxkp); //fprintf(stderr,"finished kp data of utxo for staking %u ht.%d numkp.%d maxkp.%d\n",(uint32_t)time(NULL),nHeight,numkp,maxkp);
} }
fprintf(stderr,"numkp.%d blocktime.%u\n",numkp,*blocktimep); //fprintf(stderr,"numkp.%d blocktime.%u\n",numkp,*blocktimep);
block_from_future_rejecttime = (uint32_t)GetAdjustedTime() + 57; block_from_future_rejecttime = (uint32_t)GetAdjustedTime() + 57;
for (i=winners=0; i<numkp; i++) for (i=winners=0; i<numkp; i++)
{ {

View File

@@ -1494,7 +1494,7 @@ void static BitcoinMiner()
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
// notaries always default to staking // notaries always default to staking
CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey, pindexPrev->GetHeight()+1, gpucount, ASSETCHAINS_STAKED != 0 && GetArg("-genproclimit", -1) == 0); CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey, pindexPrev->GetHeight()+1, gpucount, ASSETCHAINS_STAKED != 0 && KOMODO_MININGTHREADS == 0);
#else #else
CBlockTemplate *ptr = CreateNewBlockWithKey(); CBlockTemplate *ptr = CreateNewBlockWithKey();
#endif #endif
@@ -1502,7 +1502,7 @@ void static BitcoinMiner()
{ {
static uint32_t counter; static uint32_t counter;
if ( counter++ < 100 && ASSETCHAINS_STAKED == 0 ) if ( counter++ < 100 && ASSETCHAINS_STAKED == 0 )
fprintf(stderr,"created illegal block, retry\n"); fprintf(stderr,"created illegal blockB, retry\n");
sleep(1); sleep(1);
continue; continue;
} }