diff options
author | R E Broadley <rebroad+github@gmail.com> | 2012-05-17 22:05:36 +0100 |
---|---|---|
committer | R E Broadley <rebroad+github@gmail.com> | 2012-07-02 21:58:47 +0100 |
commit | 90c838da9faca667a0809a44a7b6202772de04ec (patch) | |
tree | 15d2850e97a38831af5764c8135e8c225fb165e8 /src | |
parent | e75acc006e8bc5c44d1d6e6c3b027fe28d8c743b (diff) |
Show when node is misbehaving, not just at the point that it gets banned.
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index f1073e0a3e..a65d9bec0f 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -586,7 +586,7 @@ bool CNode::Misbehaving(int howmuch) { if (addr.IsLocal()) { - printf("Warning: local node %s misbehaving\n", addrName.c_str()); + printf("Warning: local node %s misbehaving (delta: %d)\n", addrName.c_str(), howmuch); return false; } @@ -594,15 +594,16 @@ bool CNode::Misbehaving(int howmuch) if (nMisbehavior >= GetArg("-banscore", 100)) { int64 banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban + printf("Misbehaving: %s (%d -> %d) DISCONNECTING\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); { LOCK(cs_setBanned); if (setBanned[addr] < banTime) setBanned[addr] = banTime; } CloseSocketDisconnect(); - printf("Disconnected %s for misbehavior (score=%d)\n", addrName.c_str(), nMisbehavior); return true; - } + } else + printf("Misbehaving: %s (%d -> %d)\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); return false; } |