diff options
| author | James O'Beirne <[email protected]> | 2019-09-10 13:09:12 -0400 |
|---|---|---|
| committer | James O'Beirne <[email protected]> | 2019-09-11 10:24:44 -0400 |
| commit | 82e53f37e1bfa6e34eac16b33329d70c3c0127da (patch) | |
| tree | f65e290eca64080b3e33370f37b26eebcff4c031 /src/net_processing.cpp | |
| parent | Merge #16413: depends: Bump QT to LTS release 5.9.8 (diff) | |
| download | discoin-82e53f37e1bfa6e34eac16b33329d70c3c0127da.tar.xz discoin-82e53f37e1bfa6e34eac16b33329d70c3c0127da.zip | |
doc: add comments clarifying how local services are advertised
Recent questions have come up regarding dynamic service registration
(see https://github.com/bitcoin/bitcoin/pull/16442#discussion_r308702676
and the assumeutxo project, which needs to dynamically flip NODE_NETWORK).
While investigating how dynamic service registration might work, I was
confused about how we convey local services to peers. This adds some
documentation that hopefully clarifies this process.
Diffstat (limited to 'src/net_processing.cpp')
| -rw-r--r-- | src/net_processing.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 7f2fea558..93a98974e 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -415,6 +415,9 @@ static void UpdatePreferredDownload(CNode* node, CNodeState* state) EXCLUSIVE_LO static void PushNodeVersion(CNode *pnode, CConnman* connman, int64_t nTime) { + // Note that pnode->GetLocalServices() is a reflection of the local + // services we were offering when the CNode object was created for this + // peer. ServiceFlags nLocalNodeServices = pnode->GetLocalServices(); uint64_t nonce = pnode->GetLocalNonce(); int nNodeStartingHeight = pnode->GetMyStartingHeight(); |