Creates a MessageSendEvent for sending a reply_channel_range message.
This event will be fired when handling inbound query_channel_range
messages in the NetGraphMessageHandler.
&events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => true,
&events::MessageSendEvent::SendChannelRangeQuery { .. } => false,
&events::MessageSendEvent::SendShortIdsQuery { .. } => false,
+ &events::MessageSendEvent::SendReplyChannelRange { .. } => false,
}
});
}
peer.pending_outbound_buffer.push_back(peer.channel_encryptor.encrypt_message(&encode_msg!(msg)));
self.do_attempt_write_data(&mut descriptor, peer);
}
+ MessageSendEvent::SendReplyChannelRange { ref node_id, ref msg } => {
+ log_trace!(self.logger, "Handling SendReplyChannelRange event in peer_handler for node {} with num_scids={} first_blocknum={} number_of_blocks={}, sync_complete={}",
+ log_pubkey!(node_id),
+ msg.short_channel_ids.len(),
+ msg.first_blocknum,
+ msg.number_of_blocks,
+ msg.sync_complete);
+ let (mut descriptor, peer) = get_peer_for_forwarding!(node_id, {});
+ peer.pending_outbound_buffer.push_back(peer.channel_encryptor.encrypt_message(&encode_msg!(msg)));
+ self.do_attempt_write_data(&mut descriptor, peer);
+ }
}
}
/// The query_short_channel_ids which should be sent.
msg: msgs::QueryShortChannelIds,
},
+ /// Sends a reply to a channel range query. This may be one of several events
+ /// emitted during processing of the query.
+ SendReplyChannelRange {
+ /// The node_id of this message recipient
+ node_id: PublicKey,
+ /// The reply_channel_range which should be sent.
+ msg: msgs::ReplyChannelRange,
+ }
}
/// A trait indicating an object may generate message send events