Skip to content

Commit 80ae230

Browse files
committed
Improve log messages for blocks only violations.
1 parent 08843ed commit 80ae230

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4256,7 +4256,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
42564256
else
42574257
{
42584258
if (fBlocksOnly)
4259-
LogPrint("net", "peer sent inv %s in violation of protocol peer=%d\n", inv.ToString(), pfrom->id);
4259+
LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id);
42604260
else if (!fAlreadyHave && !fImporting && !fReindex)
42614261
pfrom->AskFor(inv);
42624262
}
@@ -4388,7 +4388,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
43884388
// We are in blocks only mode and peer is either not whitelisted or whitelistalwaysrelay is off
43894389
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY)))
43904390
{
4391-
LogPrint("net", "peer sent transaction in violation of protocol peer=%d\n", pfrom->id);
4391+
LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
43924392
return true;
43934393
}
43944394

0 commit comments

Comments
 (0)