This commit is contained in:
jl777
2016-10-30 19:16:53 -03:00
parent ced1a10b52
commit 12691d502c
2 changed files with 10 additions and 10 deletions

View File

@@ -1470,12 +1470,12 @@ bool IsInitialBlockDownload()
LOCK(cs_main); LOCK(cs_main);
if (fImporting || fReindex) if (fImporting || fReindex)
{ {
fprintf(stderr,"fImporting %d || %d fReindex\n",(int32_t)fImporting,(int32_t)fReindex); //fprintf(stderr,"fImporting %d || %d fReindex\n",(int32_t)fImporting,(int32_t)fReindex);
return true; return true;
} }
if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints())) if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints()))
{ {
fprintf(stderr,"checkpoint -> initialdownload\n"); //fprintf(stderr,"checkpoint -> initialdownload\n");
return true; return true;
} }
static bool lockIBDState = false; static bool lockIBDState = false;
@@ -1491,7 +1491,7 @@ bool IsInitialBlockDownload()
else state = (chainActive.Height() < pindexBestHeader->nHeight - 10); else state = (chainActive.Height() < pindexBestHeader->nHeight - 10);
if (!state) if (!state)
{ {
fprintf(stderr,"lockIBDState tru\n"); //fprintf(stderr,"lockIBDState tru\n");
lockIBDState = true; lockIBDState = true;
} }
return state; return state;

View File

@@ -440,7 +440,7 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33)
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
{ {
CPubKey pubkey; CScript scriptPubKey; uint8_t *script,*ptr; int32_t i; CPubKey pubkey; CScript scriptPubKey; uint8_t *script,*ptr; int32_t i;
fprintf(stderr,"%s createnewblockwith key\n",ASSETCHAINS_SYMBOL); //fprintf(stderr,"%s createnewblockwith key\n",ASSETCHAINS_SYMBOL);
if ( USE_EXTERNAL_PUBKEY != 0 ) if ( USE_EXTERNAL_PUBKEY != 0 )
{ {
//fprintf(stderr,"use notary pubkey\n"); //fprintf(stderr,"use notary pubkey\n");
@@ -511,7 +511,7 @@ void static BitcoinMiner(CWallet *pwallet)
std::string solver = GetArg("-equihashsolver", "tromp"); std::string solver = GetArg("-equihashsolver", "tromp");
assert(solver == "tromp" || solver == "default"); assert(solver == "tromp" || solver == "default");
LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k); LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k);
fprintf(stderr,"Mining with %s\n",solver.c_str()); //fprintf(stderr,"Mining with %s\n",solver.c_str());
std::mutex m_cs; std::mutex m_cs;
bool cancelSolver = false; bool cancelSolver = false;
boost::signals2::connection c = uiInterface.NotifyBlockTip.connect( boost::signals2::connection c = uiInterface.NotifyBlockTip.connect(
@@ -522,7 +522,7 @@ void static BitcoinMiner(CWallet *pwallet)
); );
try { try {
fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str());
while (true) while (true)
{ {
if (chainparams.MiningRequiresPeers()) if (chainparams.MiningRequiresPeers())
@@ -539,12 +539,12 @@ void static BitcoinMiner(CWallet *pwallet)
if (!fvNodesEmpty && !IsInitialBlockDownload()) if (!fvNodesEmpty && !IsInitialBlockDownload())
break; break;
MilliSleep(5000); MilliSleep(5000);
fprintf(stderr,"fvNodesEmpty %d IsInitialBlockDownload(%s) %d\n",(int32_t)fvNodesEmpty,ASSETCHAINS_SYMBOL,(int32_t)IsInitialBlockDownload()); //fprintf(stderr,"fvNodesEmpty %d IsInitialBlockDownload(%s) %d\n",(int32_t)fvNodesEmpty,ASSETCHAINS_SYMBOL,(int32_t)IsInitialBlockDownload());
} while (true); } while (true);
fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL); //fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL);
} }
fprintf(stderr,"%s create new block\n",ASSETCHAINS_SYMBOL); //fprintf(stderr,"%s create new block\n",ASSETCHAINS_SYMBOL);
// //
// Create new block // Create new block
// //
@@ -576,7 +576,7 @@ void static BitcoinMiner(CWallet *pwallet)
//fprintf(stderr,"I am the chosen one for ht.%d\n",pindexPrev->nHeight+1); //fprintf(stderr,"I am the chosen one for ht.%d\n",pindexPrev->nHeight+1);
} else Mining_start = 0; } else Mining_start = 0;
Mining_height = pindexPrev->nHeight+1; Mining_height = pindexPrev->nHeight+1;
fprintf(stderr,"%s start mining loop\n",ASSETCHAINS_SYMBOL); //fprintf(stderr,"%s start mining loop\n",ASSETCHAINS_SYMBOL);
while (true) while (true)
{ {
// Hash state // Hash state