X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fln%2Fmsgs.rs;h=0a86b031eb1755401337fcf21ee051075536414e;hb=5481a5d653482cfccddeae78a26e14240804a7df;hp=ed0b3479b78b82060ad85c49f36570f289198840;hpb=fb1bf30263cbb60c5f9ce9ac2e37ef7b9cf57de1;p=rust-lightning diff --git a/src/ln/msgs.rs b/src/ln/msgs.rs index ed0b3479..0a86b031 100644 --- a/src/ln/msgs.rs +++ b/src/ln/msgs.rs @@ -386,7 +386,7 @@ pub enum HTLCFailChannelUpdate { /// A trait to describe an object which can receive channel messages. Messages MAY be called in /// paralell when they originate from different their_node_ids, however they MUST NOT be called in /// paralell when the two calls have the same their_node_id. -pub trait ChannelMessageHandler : events::EventsProvider { +pub trait ChannelMessageHandler : events::EventsProvider + Send + Sync { //Channel init: fn handle_open_channel(&self, their_node_id: &PublicKey, msg: &OpenChannel) -> Result; fn handle_accept_channel(&self, their_node_id: &PublicKey, msg: &AcceptChannel) -> Result<(), HandleError>; @@ -419,7 +419,7 @@ pub trait ChannelMessageHandler : events::EventsProvider { fn peer_disconnected(&self, their_node_id: &PublicKey, no_connection_possible: bool); } -pub trait RoutingMessageHandler { +pub trait RoutingMessageHandler : Send + Sync { fn handle_node_announcement(&self, msg: &NodeAnnouncement) -> Result<(), HandleError>; /// Handle a channel_announcement message, returning true if it should be forwarded on, false /// or returning an Err otherwise.