File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -553,7 +553,8 @@ where
553
553
}
554
554
LdkEvent :: SpendableOutputs { outputs } => {
555
555
// TODO: We should eventually remember the outputs and supply them to the wallet's coin selection, once BDK allows us to do so.
556
- let destination_address = self . wallet . get_new_address ( ) . unwrap ( ) ;
556
+ let destination_address =
557
+ self . wallet . get_new_address ( ) . expect ( "Failed to get destination address" ) ;
557
558
let output_descriptors = & outputs. iter ( ) . collect :: < Vec < _ > > ( ) ;
558
559
let tx_feerate =
559
560
self . wallet . get_est_sat_per_1000_weight ( ConfirmationTarget :: Normal ) ;
Original file line number Diff line number Diff line change @@ -1062,7 +1062,9 @@ impl Node {
1062
1062
///
1063
1063
/// **Note:** This **MUST** be called after each event has been handled.
1064
1064
pub fn event_handled ( & self ) {
1065
- self . event_queue . event_handled ( ) . unwrap ( ) ;
1065
+ self . event_queue
1066
+ . event_handled ( )
1067
+ . expect ( "Couldn't mark event handled due to persistence failure" ) ;
1066
1068
}
1067
1069
1068
1070
/// Returns our own node id
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub(crate) struct FilesystemLogger {
15
15
impl FilesystemLogger {
16
16
pub ( crate ) fn new ( file_path : String ) -> Self {
17
17
if let Some ( parent_dir) = Path :: new ( & file_path) . parent ( ) {
18
- fs:: create_dir_all ( parent_dir) . unwrap ( ) ;
18
+ fs:: create_dir_all ( parent_dir) . expect ( "Failed to create log parent directory" ) ;
19
19
}
20
20
Self { file_path }
21
21
}
@@ -35,8 +35,8 @@ impl Logger for FilesystemLogger {
35
35
. create ( true )
36
36
. append ( true )
37
37
. open ( self . file_path . clone ( ) )
38
- . unwrap ( )
38
+ . expect ( "Failed to open log file" )
39
39
. write_all ( log. as_bytes ( ) )
40
- . unwrap ( ) ;
40
+ . expect ( "Failed to write to log file" )
41
41
}
42
42
}
You can’t perform that action at this time.
0 commit comments