diff options
author | Mike Hearn <hearn@google.com> | 2013-11-21 14:38:29 +0100 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-11-28 11:03:33 +1000 |
commit | 1c53d0a4fbdc1efd9ed316556a12fb52082db32e (patch) | |
tree | 4e46f29dfe0b5b579d9f73409ab958c69e74c39a | |
parent | 3779de9d8916644f9b235da68cb0d6f63a173d13 (diff) |
Add some additional logging to give extra network insight.
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index fa7372d69f..b0a6e36236 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -818,9 +818,6 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fCheckIn EraseFromWallets(ptxOld->GetHash()); SyncWithWallets(hash, tx, NULL, true); - printf("CTxMemPool::accept() : accepted %s (poolsz %"PRIszu")\n", - hash.ToString().c_str(), - mapTx.size()); return true; } @@ -3288,7 +3285,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) pfrom->fSuccessfullyConnected = true; - printf("receive version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString().c_str(), addrFrom.ToString().c_str(), pfrom->addr.ToString().c_str()); + printf("receive version message: %s: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->strSubVer.c_str(), pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString().c_str(), addrFrom.ToString().c_str(), pfrom->addr.ToString().c_str()); cPeerBlockCounts.input(pfrom->nStartingHeight); } @@ -3536,6 +3533,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) vWorkQueue.push_back(inv.hash); vEraseQueue.push_back(inv.hash); + printf("AcceptToMemoryPool: %s %s : accepted %s (poolsz %"PRIszu")\n", + pfrom->addr.ToString().c_str(), pfrom->strSubVer.c_str(), + tx.GetHash().ToString().c_str(), + mempool.mapTx.size()); + // Recursively process any orphan transactions that depended on this one for (unsigned int i = 0; i < vWorkQueue.size(); i++) { @@ -3583,8 +3585,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } int nDoS = 0; if (state.IsInvalid(nDoS)) + { + printf("%s from %s %s was not accepted into the memory pool\n", tx.GetHash().ToString().c_str(), + pfrom->addr.ToString().c_str(), pfrom->strSubVer.c_str()); if (nDoS > 0) pfrom->Misbehaving(nDoS); + } } |