bolt07: explicit that the peer may fail the connection if wrong chain_hash in query_messages #678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the
query_
messages, the node receiving the query (query_
[channel_range
/short_channel_ids
]) will set thecomplete
flag to0
in the reply if it does not maintain up-to-date informations about the network specified in the requestchain_hash
. If this is the case then it's not an interesting node for the initial peer, which may fail the connection.This explicits a constraints on the
reply_channel_range
that is implied to not have any information in the first place (to set thelen
of the list of scds to0
). This is a modification of aMUST
but we already do this for C-lightning, and (really not sure though) I don't think Eclair and LND even send a reply withcomplete
to0
on badchain_hash
? (https:/lightningnetwork/lnd/blob/2dd23819bb0b24d1ece97057d7c469efb9e1d844/discovery/syncer.go#L809, https:/ACINQ/eclair/blob/b5461b80c83b3500449d5593afdce1d660e4aeb8/eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala#L584)