diff options
author | John Newbery <john@johnnewbery.com> | 2020-10-23 10:24:16 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-03-20 10:24:40 +0000 |
commit | 7c4cc67c0c3c50df004ee53cac5b2884b7fbab29 (patch) | |
tree | 46a6057a19abb8d7c21d5c613fedec49c143041c /src/rpc | |
parent | bcd7f30b7944892db7ae37069175804567bb0cdf (diff) |
[net] remove CConnman::AddNewAddresses
It just forwards calls to CAddrMan::Add.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/net.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index d4c1ab4b53..96533a50c8 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -907,8 +907,8 @@ static RPCHelpMan addpeeraddress() [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { NodeContext& node = EnsureNodeContext(request.context); - if (!node.connman) { - throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); + if (!node.addrman) { + throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Address manager functionality missing or disabled"); } UniValue obj(UniValue::VOBJ); @@ -925,7 +925,7 @@ static RPCHelpMan addpeeraddress() address.nTime = GetAdjustedTime(); // The source address is set equal to the address. This is equivalent to the peer // announcing itself. - if (!node.connman->AddNewAddresses({address}, address)) { + if (!node.addrman->Add(address, address)) { obj.pushKV("success", false); return obj; } |