diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-06-22 13:11:57 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-06-22 13:11:57 -0400 |
commit | d07eaba195984410522b78884ff7ff72ec2ecc78 (patch) | |
tree | 168f64a8c24a87c30cb0940d2e9034d0df120da6 /src/main.cpp | |
parent | c4879a0c2fea705b6ad7956502acc7897838e841 (diff) |
Introduce -debugnet option, thereby quieting some redundant debug messages
Prior to this change, each TX typically generated 3+ debug messages,
askfor tx 8644cc97480ba1537214 0
sending getdata: tx 8644cc97480ba1537214
askfor tx 8644cc97480ba1537214 1339640761000000
askfor tx 8644cc97480ba1537214 1339640881000000
CTxMemPool::accept() : accepted 8644cc9748 (poolsz 6857)
After this change, there is only one message for each valid TX received
CTxMemPool::accept() : accepted 22a73c5d8c (poolsz 42)
and two messages for each orphan tx received
ERROR: FetchInputs() : 673dc195aa mempool Tx prev not found 1e439346fc
stored orphan tx 673dc195aa (mapsz 19)
The -debugnet option, or its superset -debug, will restore the full debug
output.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 50a740d160..c82b6fd5e8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3142,7 +3142,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle) const CInv& inv = (*pto->mapAskFor.begin()).second; if (!AlreadyHave(txdb, inv)) { - printf("sending getdata: %s\n", inv.ToString().c_str()); + if (fDebugNet) + printf("sending getdata: %s\n", inv.ToString().c_str()); vGetData.push_back(inv); if (vGetData.size() >= 1000) { |