aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-19 12:58:30 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-19 12:58:41 +0100
commit09eb46c9430bb549cf4ffc3815a951ecdb90fef7 (patch)
tree66f61c6e354107a9fd75eb7362c8a7e4007f46a4 /src/net.h
parent6a680a6236e07c93f28514fe05fbb64a29cb2ec8 (diff)
parent3e68efa615968e0c9d68a7f197c7852478f6be78 (diff)
Merge #21187: Net processing: Only call PushAddress() from net_processing
3e68efa615968e0c9d68a7f197c7852478f6be78 [net] Move checks from GetLocalAddrForPeer to caller (John Newbery) d21d2b264cd77c027a06f68289cf4c3f177d1ed0 [net] Change AdvertiseLocal to GetLocalAddrForPeer (John Newbery) Pull request description: This is the first part of #21186. It slightly disentangles addr handling in net/net_processing by making it explicit that net_processing is responsible for pushing addr records into `vAddrToSend`. ACKs for top commit: MarcoFalke: re-ACK 3e68efa615968e0c9d68a7f197c7852478f6be78 🍅 Tree-SHA512: 9af50c41f5a977e2e277f24a589db38e2980b353401def5e74b108ac5f493d9b5d6b1b8bf15323a4d66321495f04bc271450fcef7aa7d1c095f051a4f8e9b15f
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)