}
pub trait RoutingMessageHandler : Send + Sync {
- fn handle_node_announcement(&self, msg: &NodeAnnouncement) -> Result<(), HandleError>;
+ fn handle_node_announcement(&self, msg: &NodeAnnouncement) -> Result<bool, HandleError>;
/// Handle a channel_announcement message, returning true if it should be forwarded on, false
/// or returning an Err otherwise.
fn handle_channel_announcement(&self, msg: &ChannelAnnouncement) -> Result<bool, HandleError>;
- fn handle_channel_update(&self, msg: &ChannelUpdate) -> Result<(), HandleError>;
+ fn handle_channel_update(&self, msg: &ChannelUpdate) -> Result<bool, HandleError>;
fn handle_htlc_fail_channel_update(&self, update: &HTLCFailChannelUpdate);
}
}
shutdown_scriptpubkey = Some(Script::from(v[321..321+len].to_vec()));
}
-
+ let mut temp_channel_id = [0; 32];
+ temp_channel_id[..].copy_from_slice(&v[32..64]);
Ok(OpenChannel {
chain_hash: deserialize(&v[0..32]).unwrap(),
- temporary_channel_id: deserialize(&v[32..64]).unwrap(),
+ temporary_channel_id: temp_channel_id,
funding_satoshis: byte_utils::slice_to_be64(&v[64..72]),
push_msat: byte_utils::slice_to_be64(&v[72..80]),
dust_limit_satoshis: byte_utils::slice_to_be64(&v[80..88]),