aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-07-09 07:42:11 +0100
committerJohn Newbery <john@johnnewbery.com>2021-02-18 09:28:06 +0000
commitd21d2b264cd77c027a06f68289cf4c3f177d1ed0 (patch)
tree8af47d2c169f527e619efae3c9c979874e3a486e /src/net.h
parent9bbf08bf98487eeb75f143c120cfd544ea3135fb (diff)
downloadbitcoin-d21d2b264cd77c027a06f68289cf4c3f177d1ed0.tar.xz
[net] Change AdvertiseLocal to GetLocalAddrForPeer
Gossiping addresses to peers is the responsibility of net processing. Change AdvertiseLocal() in net to just return an (optional) address for net processing to advertise. Update function name to reflect new responsibility.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 682150d65a..67d1cf0e55 100644
--- a/src/net.h
+++ b/src/net.h
@@ -197,7 +197,8 @@ enum
};
bool IsPeerAddrLocalGood(CNode *pnode);
-void AdvertiseLocal(CNode *pnode);
+/** Returns a local address that we should advertise to this peer */
+Optional<CAddress> GetLocalAddrForPeer(CNode *pnode);
/**
* Mark a network as reachable or unreachable (no automatic connects to it)