Skip to content

Commit

Permalink
chore: disable panic
Browse files Browse the repository at this point in the history
This will allow us to start again the node but could risk getting punished
  • Loading branch information
bonomat committed Jan 29, 2024
1 parent 121bc32 commit e49030e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4026,20 +4026,14 @@ impl<SP: Deref> Channel<SP> where
return Err(ChannelError::Close("Peer sent a garbage channel_reestablish with secret key not matching the commitment height provided".to_owned()));
}
if msg.next_remote_commitment_number > INITIAL_COMMITMENT_NUMBER - self.context.cur_holder_commitment_transaction_number {
macro_rules! log_and_panic {
($err_msg: expr) => {
log_error!(logger, $err_msg, &self.context.channel_id, log_pubkey!(self.context.counterparty_node_id));
panic!($err_msg, &self.context.channel_id, log_pubkey!(self.context.counterparty_node_id));
}
}
log_and_panic!("We have fallen behind - we have received proof that if we broadcast our counterparty is going to claim all our funds.\n\
log_error!(logger, "We have fallen behind - we have received proof that if we broadcast our counterparty is going to claim all our funds.\n\
This implies you have restarted with lost ChannelMonitor and ChannelManager state, the first of which is a violation of the LDK chain::Watch requirements.\n\
More specifically, this means you have a bug in your implementation that can cause loss of funds, or you are running with an old backup, which is unsafe.\n\
If you have restored from an old backup and wish to force-close channels and return to operation, you should start up, call\n\
ChannelManager::force_close_without_broadcasting_txn on channel {} with counterparty {} or\n\
ChannelManager::force_close_all_channels_without_broadcasting_txn, then reconnect to peer(s).\n\
Note that due to a long-standing bug in lnd you may have to reach out to peers running lnd-based nodes to ask them to manually force-close channels\n\
See https://github.com/lightningdevkit/rust-lightning/issues/1565 for more info.");
See https://github.com/lightningdevkit/rust-lightning/issues/1565 for more info.",&self.context.channel_id, log_pubkey!(self.context.counterparty_node_id) );
}
}

Expand Down

0 comments on commit e49030e

Please sign in to comment.