/// An init message to be sent or received from a peer
pub struct Init {
+ #[cfg(not(feature = "fuzztarget"))]
pub(crate) features: InitFeatures,
+ #[cfg(feature = "fuzztarget")]
+ pub features: InitFeatures,
}
/// An error message to be sent or received from a peer
fn peer_disconnected(&self, their_node_id: &PublicKey, no_connection_possible: bool);
/// Handle a peer reconnecting, possibly generating channel_reestablish message(s).
- fn peer_connected(&self, their_node_id: &PublicKey);
+ fn peer_connected(&self, their_node_id: &PublicKey, msg: &Init);
/// Handle an incoming channel_reestablish message from the given peer.
fn handle_channel_reestablish(&self, their_node_id: &PublicKey, msg: &ChannelReestablish);
/// starting at the node *after* the provided publickey and including batch_amount entries.
/// If None is provided for starting_point, we start at the first node.
fn get_next_node_announcements(&self, starting_point: Option<&PublicKey>, batch_amount: u8) -> Vec<NodeAnnouncement>;
+ /// Returns whether a full sync should be requested from a peer.
+ fn should_request_full_sync(&self, node_id: &PublicKey) -> bool;
}
pub(crate) struct OnionRealm0HopData {