Quieten 'getdata' P2P message output

Output one message per getdata, not one message per 'inv' entry.
This commit is contained in:
Jeff Garzik 2012-06-23 21:38:33 -04:00 committed by Jeff Garzik
parent d62a1947be
commit 983e4bdef0

View file

@ -2575,11 +2575,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
return error("message getdata size() = %d", vInv.size()); return error("message getdata size() = %d", vInv.size());
} }
if (fDebugNet || (vInv.size() != 1))
printf("received getdata (%d invsz)\n", vInv.size());
BOOST_FOREACH(const CInv& inv, vInv) BOOST_FOREACH(const CInv& inv, vInv)
{ {
if (fShutdown) if (fShutdown)
return true; return true;
printf("received getdata for: %s\n", inv.ToString().c_str()); if (fDebugNet || (vInv.size() == 1))
printf("received getdata for: %s\n", inv.ToString().c_str());
if (inv.type == MSG_BLOCK) if (inv.type == MSG_BLOCK)
{ {