Skip to content

Instantly share code, notes, and snippets.

@luke-jr
Created July 12, 2012 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luke-jr/3094657 to your computer and use it in GitHub Desktop.
Save luke-jr/3094657 to your computer and use it in GitHub Desktop.
diff --git a/src/main.cpp b/src/main.cpp
index 3052cfb..ba05c47 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1619,6 +1619,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
bnBestChainWork = pindexNew->bnChainWork;
nTimeBestReceived = GetTime();
nTransactionsUpdated++;
+ printf("TESTING: %llu Accepted block %s\n", GetTimeMillis(), hashBestChain.ToString().c_str());
printf("SetBestChain: new best=%s height=%d work=%s date=%s\n",
hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainWork.ToString().c_str(),
DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str());
@@ -1764,6 +1765,8 @@ bool CBlock::AcceptBlock()
if (mapBlockIndex.count(hash))
return error("AcceptBlock() : block already in mapBlockIndex");
+ printf("TESTING: %llu Received block %s\n", GetTimeMillis(), GetHash().ToString().c_str());
+
// Get prev block index
map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashPrevBlock);
if (mi == mapBlockIndex.end())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment