You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make DataLossProtect fields required and remove wrappers
The fields provided by `DataLossProtect` have been mandatory since
lightning/bolts@6656b70, regardless
of whether `option_dataloss_protect` or `option_remote_key` feature bits
are set.
We move the fields out of `DataLossProtect` to make encoding definitions
more succinct with `impl_writeable_msg!` and to reduce boilerplate.
This paves the way for completely removing `OptionalField` in subsequent
commits.
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\
4062
-
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\
4063
-
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\
4064
-
If you have restored from an old backup and wish to force-close channels and return to operation, you should start up, call\n\
4065
-
ChannelManager::force_close_without_broadcasting_txn on channel {} with counterparty {} or\n\
4066
-
ChannelManager::force_close_all_channels_without_broadcasting_txn, then reconnect to peer(s).\n\
4067
-
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\
4068
-
See https://github.com/lightningdevkit/rust-lightning/issues/1565 for more info.");
4069
-
}
4070
-
},
4071
-
OptionalField::Absent => {}
4058
+
}
4059
+
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\
4060
+
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\
4061
+
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\
4062
+
If you have restored from an old backup and wish to force-close channels and return to operation, you should start up, call\n\
4063
+
ChannelManager::force_close_without_broadcasting_txn on channel {} with counterparty {} or\n\
4064
+
ChannelManager::force_close_all_channels_without_broadcasting_txn, then reconnect to peer(s).\n\
4065
+
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\
4066
+
See https://github.com/lightningdevkit/rust-lightning/issues/1565 for more info.");
let remote_last_secret = self.commitment_secrets.get_secret(self.cur_counterparty_commitment_transaction_number + 2).unwrap();
5656
5651
log_trace!(logger,"Enough info to generate a Data Loss Protect with per_commitment_secret {} for channel {}", log_bytes!(remote_last_secret), log_bytes!(self.channel_id()));
0 commit comments