From 854f1af22e930cbe37195a5e9ad7dd7b878a9106 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 26 Jun 2016 20:32:37 +0200 Subject: [PATCH] Make the dummy argument to getaddednodeinfo optional --- doc/release-notes.md | 2 ++ src/rpc/client.cpp | 1 - src/rpc/net.cpp | 11 +++++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index f2d8ca3a15..58994a6839 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -63,6 +63,8 @@ UTXO set query (`GET /rest/getutxos//-/-/.../ 2) + if (fHelp || params.size() > 1) throw runtime_error( - "getaddednodeinfo dummy ( \"node\" )\n" + "getaddednodeinfo ( \"node\" )\n" "\nReturns information about the given added node, or all added nodes\n" "(note that onetry addnodes are not listed here)\n" "\nArguments:\n" - "1. dummy (boolean, required) Kept for historical purposes but ignored\n" - "2. \"node\" (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.\n" + "1. \"node\" (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.\n" "\nResult:\n" "[\n" " {\n" @@ -299,10 +298,10 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp) std::vector vInfo = GetAddedNodeInfo(); - if (params.size() == 2) { + if (params.size() == 1) { bool found = false; for (const AddedNodeInfo& info : vInfo) { - if (info.strAddedNode == params[1].get_str()) { + if (info.strAddedNode == params[0].get_str()) { vInfo.assign(1, info); found = true; break;