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
Copy file name to clipboardExpand all lines: src/ln/channel.rs
+48-5Lines changed: 48 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ use secp256k1::{Secp256k1,Signature};
16
16
use secp256k1;
17
17
18
18
use ln::msgs;
19
-
use ln::msgs::{DecodeError,OptionalField,LocalFeatures};
19
+
use ln::msgs::{DecodeError,OptionalField,LocalFeatures,DataLossProtect};
20
20
use ln::channelmonitor::ChannelMonitor;
21
21
use ln::channelmanager::{PendingHTLCStatus,HTLCSource,HTLCFailReason,HTLCFailureMsg,PendingForwardHTLCInfo,RAACommitmentOrder,PaymentPreimage,PaymentHash,BREAKDOWN_TIMEOUT,MAX_LOCAL_BREAKDOWN_TIMEOUT};
22
22
use ln::chan_utils::{TxCreationKeys,HTLCOutputInCommitment,HTLC_SUCCESS_TX_WEIGHT,HTLC_TIMEOUT_TX_WEIGHT};
@@ -32,7 +32,7 @@ use util::config::{UserConfig,ChannelConfig};
returnErr(ChannelError::CloseDelayBroadcast{msg:"We have fallen behind - we have received proof that if we broadcast remote is going to claim our funds - we can't do any automated broadcasting",update:Some(self.channel_monitor.clone())
2524
+
});
2525
+
}
2526
+
},
2527
+
OptionalField::Absent => {}
2528
+
}
2529
+
}
2530
+
2502
2531
// Go ahead and unmark PeerDisconnected as various calls we may make check for it (and all
2503
2532
// remaining cases either succeed or ErrorMessage-fail).
log_debug!(self,"We don't seen yet any revoked secret, if this channnel has already been updated it means we are fallen-behind, you should wait for other peer closing");
Err(ChannelError::CloseDelayBroadcast{ .. }) => { panic!("Wait is only generated on receipt of channel_reestablish, which is handled by try_chan_entry, we don't bother to support it here");}
// Upstream channel is dead, but we want at least to fail backward HTLCs to save
489
+
// downstream channels. In case of PermanentFailure, we are not going to be able
490
+
// to claim back to_remote output on remote commitment transaction. Doesn't
491
+
// make a difference here, we are concern about HTLCs circuit, not onchain funds.
492
+
ChannelMonitorUpdateErr::PermanentFailure => {},
493
+
ChannelMonitorUpdateErr::TemporaryFailure => {},
494
+
}
495
+
}
496
+
}
497
+
letmut shutdown_res = chan.force_shutdown();
498
+
if shutdown_res.0.len() >= 1{
499
+
log_error!($self,"You have a toxic local commitment transaction {} avaible in channel monitor, read comment in ChannelMonitor::get_latest_local_commitment_txn to be informed of manual action to take", shutdown_res.0[0].txid());
0 commit comments