File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ use crate::io;
46
46
use crate :: prelude:: * ;
47
47
use core:: { cmp, mem, fmt} ;
48
48
use core:: ops:: Deref ;
49
- use core:: convert:: TryInto ;
50
49
#[ cfg( any( test, fuzzing, debug_assertions) ) ]
51
50
use crate :: sync:: Mutex ;
52
51
use bitcoin:: hashes:: hex:: ToHex ;
@@ -4532,8 +4531,8 @@ impl<Signer: Sign> Channel<Signer> {
4532
4531
// We either haven't seen any confirmation yet, or observed a reorg.
4533
4532
return 0 ;
4534
4533
}
4535
- let funding_tx_confirmations = height as i64 - self . funding_tx_confirmation_height as i64 + 1 ;
4536
- funding_tx_confirmations . try_into ( ) . unwrap_or ( 0 )
4534
+
4535
+ height . checked_sub ( self . funding_tx_confirmation_height ) . map_or ( 0 , |c| c + 1 )
4537
4536
}
4538
4537
4539
4538
fn get_holder_selected_contest_delay ( & self ) -> u16 {
You can’t perform that action at this time.
0 commit comments