- // Single reply - overflow of first_blocknum + number_of_blocks
- test_handling_query_channel_range(
- &net_graph_msg_handler,
- &node_id_2,
- QueryChannelRange {
- chain_hash: chain_hash.clone(),
- first_blocknum: 1,
- number_of_blocks: 0xffffffff,
- },
- vec![
- ReplyChannelRange {
- chain_hash: chain_hash.clone(),
- first_blocknum: 1,
- number_of_blocks: 0xfffffffe,
- sync_complete: true,
- short_channel_ids: vec![
- 0x000001_000000_0000, // 1x0x0
- 0x000002_000000_0000, // 2x0x0
- 0x000002_000001_0000, // 2x1x0
- 0x000100_000000_0000, // 256x0x0
- 0x000101_000000_0000, // 257x0x0
- 0xfffffe_ffffff_ffff, // max
- ]
- }
- ]
- );
-
- // Single reply - query larger than found results
- test_handling_query_channel_range(
- &net_graph_msg_handler,
- &node_id_2,
- QueryChannelRange {
- chain_hash: chain_hash.clone(),
- first_blocknum: 100,
- number_of_blocks: 1000,
- },
- vec![
- ReplyChannelRange {
- chain_hash: chain_hash.clone(),
- first_blocknum: 100,
- number_of_blocks: 1000,
- sync_complete: true,
- short_channel_ids: vec![
- 0x000100_000000_0000, // 256x0x0
- 0x000101_000000_0000, // 257x0x0
- ]
- }
- ]
- );
-
- // Tests below here will chunk replies
- net_graph_msg_handler.max_reply_scids = 1;
-
- // Multipart - new block per messages
- test_handling_query_channel_range(