X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fmsgs.rs;h=10e83e08ddeec17b114a3aea31b7bf8dfabe9332;hb=0052b2c5c3017aec1a80b6476fad441b63a67a8c;hp=6aa9e05b242fd7a53018c70cb05dd170d5d49432;hpb=8470e60415eceecf9abcb518130f08bb06b91640;p=rust-lightning diff --git a/src/ln/msgs.rs b/src/ln/msgs.rs index 6aa9e05b..10e83e08 100644 --- a/src/ln/msgs.rs +++ b/src/ln/msgs.rs @@ -59,7 +59,8 @@ pub struct LocalFeatures { } impl LocalFeatures { - pub(crate) fn new() -> LocalFeatures { + /// Create a blank LocalFeatures flags (visibility extended for fuzz tests) + pub fn new() -> LocalFeatures { LocalFeatures { flags: Vec::new(), } @@ -611,9 +612,9 @@ pub enum OptionalField { pub trait ChannelMessageHandler : events::MessageSendEventsProvider + Send + Sync { //Channel init: /// Handle an incoming open_channel message from the given peer. - fn handle_open_channel(&self, their_node_id: &PublicKey, msg: &OpenChannel) -> Result<(), HandleError>; + fn handle_open_channel(&self, their_node_id: &PublicKey, their_local_features: LocalFeatures, msg: &OpenChannel) -> Result<(), HandleError>; /// Handle an incoming accept_channel message from the given peer. - fn handle_accept_channel(&self, their_node_id: &PublicKey, msg: &AcceptChannel) -> Result<(), HandleError>; + fn handle_accept_channel(&self, their_node_id: &PublicKey, their_local_features: LocalFeatures, msg: &AcceptChannel) -> Result<(), HandleError>; /// Handle an incoming funding_created message from the given peer. fn handle_funding_created(&self, their_node_id: &PublicKey, msg: &FundingCreated) -> Result<(), HandleError>; /// Handle an incoming funding_signed message from the given peer.