-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
sv2-apps/miner-apps/translator/src/lib/sv2/channel_manager/mining_message_handler.rs
Lines 289 to 306 in 39188c7
| async fn handle_close_channel( | |
| &mut self, | |
| _server_id: Option<usize>, | |
| m: CloseChannel<'_>, | |
| _tlv_fields: Option<&[Tlv]>, | |
| ) -> Result<(), Self::Error> { | |
| info!("Received: {}", m); | |
| _ = self.channel_manager_data.safe_lock(|channel_data_manager| { | |
| if channel_data_manager.mode == ChannelMode::Aggregated { | |
| if channel_data_manager.upstream_extended_channel.is_some() { | |
| channel_data_manager.upstream_extended_channel = None; | |
| } | |
| } else { | |
| channel_data_manager.extended_channels.remove(&m.channel_id); | |
| } | |
| }); | |
| Ok(()) | |
| } |
it makes no sense to simply set channel_data_manager.upstream_extended_channel = None and continue business as usual
if the only channel that was enabling mining on this connection was closed, there's no point in continuing operation
we should trigger fallback and start working for a different server
Metadata
Metadata
Assignees
Labels
No labels