mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
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.
This commit is contained in:
parent
1985c4efda
commit
82e53f37e1
2 changed files with 38 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue