@@ -264,18 +264,7 @@ impl<C: Deref + Sync + Send, L: Deref + Sync + Send> RoutingMessageHandler for N
264
264
/// does not match our chain_hash will be rejected when the announcement is
265
265
/// processed.
266
266
fn handle_reply_channel_range ( & self , their_node_id : & PublicKey , msg : ReplyChannelRange ) -> Result < ( ) , LightningError > {
267
- 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( ) , ) ;
268
-
269
- // Validate that the remote node maintains up-to-date channel
270
- // information for chain_hash. Some nodes use the full_information
271
- // flag to indicate multi-part messages so we must check whether
272
- // we received SCIDs as well.
273
- if !msg. full_information && msg. short_channel_ids . len ( ) == 0 {
274
- return Err ( LightningError {
275
- err : String :: from ( "Received reply_channel_range with no information available" ) ,
276
- action : ErrorAction :: IgnoreError ,
277
- } ) ;
278
- }
267
+ 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( ) , ) ;
279
268
280
269
log_debug ! ( self . logger, "Sending query_short_channel_ids peer={}, batch_size={}" , log_pubkey!( their_node_id) , msg. short_channel_ids. len( ) ) ;
281
270
let mut pending_events = self . pending_events . lock ( ) . unwrap ( ) ;
@@ -2015,7 +2004,7 @@ mod tests {
2015
2004
{
2016
2005
let result = net_graph_msg_handler. handle_reply_channel_range ( & node_id_1, ReplyChannelRange {
2017
2006
chain_hash,
2018
- full_information : true ,
2007
+ sync_complete : true ,
2019
2008
first_blocknum : 0 ,
2020
2009
number_of_blocks : 2000 ,
2021
2010
short_channel_ids : vec ! [
@@ -2048,22 +2037,6 @@ mod tests {
2048
2037
_ => panic ! ( "expected MessageSendEvent::SendShortIdsQuery" ) ,
2049
2038
}
2050
2039
}
2051
-
2052
- // Test receipt of a reply that indicates the remote node does not maintain up-to-date
2053
- // information for the chain_hash. Because of discrepancies in implementation we use
2054
- // full_information=false and short_channel_ids=[] as the signal.
2055
- {
2056
- // Handle the reply indicating the peer was unable to fulfill our request.
2057
- let result = net_graph_msg_handler. handle_reply_channel_range ( & node_id_1, ReplyChannelRange {
2058
- chain_hash,
2059
- full_information : false ,
2060
- first_blocknum : 1000 ,
2061
- number_of_blocks : 100 ,
2062
- short_channel_ids : vec ! [ ] ,
2063
- } ) ;
2064
- assert ! ( result. is_err( ) ) ;
2065
- assert_eq ! ( result. err( ) . unwrap( ) . err, "Received reply_channel_range with no information available" ) ;
2066
- }
2067
2040
}
2068
2041
2069
2042
#[ test]
0 commit comments