- /// original query range. In the event of a failure, we may have received
- /// some channel information. Before trying with another peer, the
- /// caller should update its set of SCIDs that need to be queried.
- fn handle_reply_channel_range(&self, their_node_id: &PublicKey, msg: &ReplyChannelRange) -> Result<(), LightningError> {
- log_debug!(self.logger, "Handling reply_channel_range peer={}, first_blocknum={}, number_of_blocks={}, full_information={}, scids={}", log_pubkey!(their_node_id), msg.first_blocknum, msg.number_of_blocks, msg.full_information, msg.short_channel_ids.len(),);
-
- // Validate that the remote node maintains up-to-date channel
- // information for chain_hash. Some nodes use the full_information
- // flag to indicate multi-part messages so we must check whether
- // we received SCIDs as well.
- if !msg.full_information && msg.short_channel_ids.len() == 0 {
- return Err(LightningError {
- err: String::from("Received reply_channel_range with no information available"),
- action: ErrorAction::IgnoreError,
- });
- }
-
- // Copy the SCIDs into a new vector to be sent in the SCID query
- let scid_size = msg.short_channel_ids.len();
- let mut short_channel_ids: Vec<u64> = Vec::with_capacity(scid_size);
- for scid in msg.short_channel_ids.iter() {
- short_channel_ids.push(scid.clone());
- }
-
- log_debug!(self.logger, "Sending query_short_channel_ids peer={}, batch_size={}", log_pubkey!(their_node_id), scid_size);
+ /// original query range. We also do not validate that the chain_hash
+ /// matches the chain_hash of the NetworkGraph. Any chan_ann message that
+ /// does not match our chain_hash will be rejected when the announcement is
+ /// processed.
+ fn handle_reply_channel_range(&self, their_node_id: &PublicKey, msg: ReplyChannelRange) -> Result<(), LightningError> {
+ log_debug!(self.logger, "Handling reply_channel_range peer={}, first_blocknum={}, number_of_blocks={}, sync_complete={}, scids={}", log_pubkey!(their_node_id), msg.first_blocknum, msg.number_of_blocks, msg.sync_complete, msg.short_channel_ids.len(),);
+
+ log_debug!(self.logger, "Sending query_short_channel_ids peer={}, batch_size={}", log_pubkey!(their_node_id), msg.short_channel_ids.len());