diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index 06ae7070c3d..a3b37aa9e5f 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -255,16 +255,18 @@ Value getaddednodeinfo(const Array& params, bool fHelp) throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node has not been added."); } + Array ret; if (!fDns) { - Object ret; BOOST_FOREACH(string& strAddNode, laddedNodes) - ret.push_back(Pair("addednode", strAddNode)); + { + Object obj; + obj.push_back(Pair("addednode", strAddNode)); + ret.push_back(obj); + } return ret; } - Array ret; - list > > laddedAddreses(0); BOOST_FOREACH(string& strAddNode, laddedNodes) {