diff options
| author | Jonas Schnelli <[email protected]> | 2015-06-29 20:37:22 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2015-07-02 20:44:27 +0200 |
| commit | 177a0e491449b9accfa0cf17c138147539071358 (patch) | |
| tree | 163b252ea7c7204017187f1e0e32ce12831fb7f0 /src/net.cpp | |
| parent | use CBanEntry as object container for banned nodes (diff) | |
| download | discoin-177a0e491449b9accfa0cf17c138147539071358.tar.xz discoin-177a0e491449b9accfa0cf17c138147539071358.zip | |
Adding CSubNet constructor over a single CNetAddr
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index ade34f575..950311ee3 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -488,7 +488,7 @@ bool CNode::IsBanned(CSubNet subnet) } void CNode::Ban(const CNetAddr& addr, const BanReason &banReason, int64_t bantimeoffset, bool sinceUnixEpoch) { - CSubNet subNet(addr.ToString()+(addr.IsIPv4() ? "/32" : "/128")); + CSubNet subNet(addr); Ban(subNet, banReason, bantimeoffset, sinceUnixEpoch); } @@ -511,7 +511,7 @@ void CNode::Ban(const CSubNet& subNet, const BanReason &banReason, int64_t banti } bool CNode::Unban(const CNetAddr &addr) { - CSubNet subNet(addr.ToString()+(addr.IsIPv4() ? "/32" : "/128")); + CSubNet subNet(addr); return Unban(subNet); } |