It was quite unclear what this field meant especially in places that say things like:
pfrom->nLocalServices
It was quite unclear what this field meant especially in places that say things like:
pfrom->nLocalServices
ping @theuni to make sure this is the case
676 | @@ -677,6 +677,7 @@ class CNode 677 | 678 | 679 | uint64_t nLocalHostNonce; 680 | + // What local services you advertised on connection to this node
I think the actors in this sentence are slightly confusing, who is 'you' and who is 'this node' here?
Suggestion to clarify? "this node" refers to "CNode" here, which is:
/** Information about a peer */
you could be rephrased as your local node?
Why do we need this variable per connection anyway? Do we advertise different services to different nodes?
@rebroad afaik it is to keep track of what services you advertised to each peer. It could change over the lifetime of the connection.
@instagibbs Services are advertised to a peer in the version message, which can be sent only once. (future version messages are ignored, and are counted as misbehaviour)
Yes, different services may be advertised to different peers, based on, say, whitelisting.
@instagibbs yes, I'd say "the local node" versus "the peer" is unambigious
Yes, the intention is to be able to (in the future) offer different services to different peers. For example, incoming vs outgoing, proxy, tor, whitelist, etc. Even if we don't do that now, it's helpful to think in terms of "what did I tell this peer I'm offering?" rather than a global value. For now each connman instance (only 1 for now) passes along the same services to all nodes.
ACK on clarifying, though I'd say something like "Services offered to this peer".
You are allowed to add or remove services to new peers.
On Sep 21, 2016 9:46 PM, "R E Broadley" notifications@github.com wrote:
@rebroad commented on this pull request.
In src/net.h #8785:
@@ -677,6 +677,7 @@ class CNode
uint64_t nLocalHostNonce;
- // What local services you advertised on connection to this node
@instagibbs https://github.com/instagibbs Services are advertised to a peer in the version message, which can be sent only once. (future version messages are ignored, and are counted as misbehaviour)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub #8785, or mute the thread https://github.com/notifications/unsubscribe-auth/AFgC04Eie8_Jv1y_l9-x0T2Mo4WbjeXzks5qsd4NgaJpZM4KDbIF .
@instagibbs Do you mean the SENDHEADERS and SENDCMPCT messages? I don't think these are counted as services according to the variable we are discussing.
updated with @theuni 's shortened version
Thanks, yes this seems fine.
ACK latest copy