We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d7156f commit f9c945eCopy full SHA for f9c945e
src/ln/channelmonitor.rs
@@ -1386,7 +1386,7 @@ impl ChannelMonitor {
1386
1387
/// Generate a spendable output event when closing_transaction get registered onchain.
1388
fn check_spend_closing_transaction(&self, tx: &Transaction) -> Option<SpendableOutputDescriptor> {
1389
- if tx.input[0].sequence == 0xFFFFFFFF && tx.input[0].witness.last().unwrap().len() == 71 {
+ if tx.input[0].sequence == 0xFFFFFFFF && !tx.input[0].witness.is_empty() && tx.input[0].witness.last().unwrap().len() == 71 {
1390
match self.key_storage {
1391
KeyStorage::PrivMode { ref shutdown_pubkey, .. } => {
1392
let our_channel_close_key_hash = Hash160::from_data(&shutdown_pubkey.serialize());
0 commit comments