CNode::IsBanned add constant reference
authorsvost <ya.nowa@yandex.ru>
Thu, 2 Feb 2017 19:40:51 +0000 (22:40 +0300)
committersvost <ya.nowa@yandex.ru>
Thu, 2 Feb 2017 19:40:51 +0000 (22:40 +0300)
src/net.cpp
src/net.h

index e284291..2a5bbf5 100644 (file)
@@ -727,7 +727,7 @@ void CNode::ClearBanned()
     setBanned.clear();
 }
 
-bool CNode::IsBanned(CNetAddr ip)
+bool CNode::IsBanned(const CNetAddr& ip)
 {
     bool fResult = false;
     {
index 0d94116..86bbbd5 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -477,7 +477,7 @@ public:
     // between nodes running old code and nodes running
     // new code.
     static void ClearBanned(); // needed for unit testing
-    static bool IsBanned(CNetAddr ip);
+    static bool IsBanned(const CNetAddr& ip);
     bool Misbehaving(int howmuch); // 1 == a little, 100 == a lot
     void copyStats(CNodeStats &stats);
     // Network stats