aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-06-12 22:27:03 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-17 21:40:56 +0200
commit1f02b802538ff16313c27f1539860ee06b907c7c (patch)
treecdbae7afe4111dd907670395c0568cce5734c5a7 /src
parentd624167387a658c9b2c25ad13492262ccd2592bf (diff)
downloadbitcoin-1f02b802538ff16313c27f1539860ee06b907c7c.tar.xz
setban: add RPCErrorCode
Diffstat (limited to 'src')
-rw-r--r--src/rpcnet.cpp2
-rw-r--r--src/rpcprotocol.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 97d5ccbff8..5a26c7c3ae 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -524,7 +524,7 @@ UniValue setban(const UniValue& params, bool fHelp)
else if(strCommand == "remove")
{
if (!( isSubnet ? CNode::Unban(subNet) : CNode::Unban(netAddr) ))
- throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, "Error: Unban failed");
+ throw JSONRPCError(RPC_MISC_ERROR, "Error: Unban failed");
}
return NullUniValue;
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index ecd7c1f7df..ccd2439c9f 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -64,6 +64,7 @@ enum RPCErrorCode
RPC_CLIENT_NODE_ALREADY_ADDED = -23, //! Node is already added
RPC_CLIENT_NODE_NOT_ADDED = -24, //! Node has not been added before
RPC_CLIENT_NODE_NOT_CONNECTED = -29, //! Node to disconnect not found in connected nodes
+ RPC_CLIENT_INVALID_IP_OR_SUBNET = -30, //! Invalid IP/Subnet
//! Wallet errors
RPC_WALLET_ERROR = -4, //! Unspecified problem with wallet (key not found etc.)