diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-12-05 17:07:30 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-12-07 11:53:29 -0500 |
commit | fa0c24c96e9937f666dcdd83d12145720c7b0329 (patch) | |
tree | bf5ce662ac1b0b3f83caed46d5d05a755e03dddd /src/rpc/net.cpp | |
parent | e2c473ff75f9ec272ab23e0ee30728b72aecd8f2 (diff) |
rpc: Document default values for optional arguments
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r-- | src/rpc/net.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index f523ca835f..4d6b260cc7 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -255,8 +255,8 @@ static UniValue disconnectnode(const JSONRPCRequest& request) "\nStrictly one out of 'address' and 'nodeid' can be provided to identify the node.\n" "\nTo disconnect by nodeid, either set 'address' to the empty string, or call using the named 'nodeid' argument only.\n", { - {"address", RPCArg::Type::STR, /* opt */ true, /* default_val */ "", "The IP address/port of the node"}, - {"nodeid", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "The node ID (see getpeerinfo for node IDs)"}, + {"address", RPCArg::Type::STR, /* opt */ true, /* default_val */ "fallback to nodeid", "The IP address/port of the node"}, + {"nodeid", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "fallback to address", "The node ID (see getpeerinfo for node IDs)"}, }} .ToString() + "\nExamples:\n" @@ -299,7 +299,7 @@ static UniValue getaddednodeinfo(const JSONRPCRequest& request) "\nReturns information about the given added node, or all added nodes\n" "(note that onetry addnodes are not listed here)\n", { - {"node", RPCArg::Type::STR, /* opt */ true, /* default_val */ "", "If provided, return information about this specific node, otherwise all nodes are returned."}, + {"node", RPCArg::Type::STR, /* opt */ true, /* default_val */ "all nodes", "If provided, return information about this specific node, otherwise all nodes are returned."}, }} .ToString() + "\nResult:\n" @@ -518,8 +518,8 @@ static UniValue setban(const JSONRPCRequest& request) { {"subnet", RPCArg::Type::STR, /* opt */ false, /* default_val */ "", "The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)"}, {"command", RPCArg::Type::STR, /* opt */ false, /* default_val */ "", "'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list"}, - {"bantime", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)"}, - {"absolute", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "", "If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)"}, + {"bantime", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "0", "time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)"}, + {"absolute", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "false", "If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)"}, }} .ToString() + "\nExamples:\n" |