File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3682,9 +3682,11 @@ impl<Signer: Sign> Channel<Signer> {
3682
3682
/// force-close the channel, but may also indicate a harmless reorganization of a block or two.
3683
3683
pub fn funding_transaction_unconfirmed ( & mut self ) -> Result < ( ) , msgs:: ErrorMessage > {
3684
3684
if self . funding_tx_confirmation_height != 0 {
3685
- let effective_new_height = self . funding_tx_confirmation_height - 1 ;
3685
+ // We handle the funding disconnection by calling update_best_block with a height one
3686
+ // below where our funding was connected, implying a reorg back to conf_height - 1.
3687
+ let reorg_height = self . funding_tx_confirmation_height - 1 ;
3686
3688
let best_time = self . update_time_counter ;
3687
- match self . update_best_block ( effective_new_height , best_time) {
3689
+ match self . update_best_block ( reorg_height , best_time) {
3688
3690
Ok ( ( funding_locked, timed_out_htlcs) ) => {
3689
3691
assert ! ( funding_locked. is_none( ) , "We can't generate a funding with 0 confirmations?" ) ;
3690
3692
assert ! ( timed_out_htlcs. is_empty( ) , "We can't have accepted HTLCs with a timeout before our funding confirmation?" ) ;
You can’t perform that action at this time.
0 commit comments