mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
p2p: rename GetAddresses -> GetAddressesUnsafe
Rename GetAddresses to GetAddressesUnsafe to make it clearer that this function should only be used in trusted contexts. This helps avoid accidental privacy leaks by preventing the uncached version from being used in non-trusted scenarios, like P2P.
This commit is contained in:
@@ -953,7 +953,7 @@ static RPCHelpMan getnodeaddresses()
|
||||
}
|
||||
|
||||
// returns a shuffled list of CAddress
|
||||
const std::vector<CAddress> vAddr{connman.GetAddresses(count, /*max_pct=*/0, network)};
|
||||
const std::vector<CAddress> vAddr{connman.GetAddressesUnsafe(count, /*max_pct=*/0, network)};
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
for (const CAddress& addr : vAddr) {
|
||||
|
||||
Reference in New Issue
Block a user