[addrman] Merge the two Add() functions

Merge the two definitions of this overloaded function to reduce code
duplication.
This commit is contained in:
Amiti Uttarwar
2021-07-22 17:00:36 -07:00
parent 3facf0a8ae
commit 60e0cbdd57
5 changed files with 42 additions and 68 deletions

View File

@@ -951,7 +951,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.addrman->Add(address, address)) success = true;
if (node.addrman->Add({address}, address)) success = true;
}
obj.pushKV("success", success);