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 @@ -526,7 +526,8 @@ where
526
526
}
527
527
LdkEvent :: SpendableOutputs { outputs } => {
528
528
// TODO: We should eventually remember the outputs and supply them to the wallet's coin selection, once BDK allows us to do so.
529
- let destination_address = self . wallet . get_new_address ( ) . unwrap ( ) ;
529
+ let destination_address =
530
+ self . wallet . get_new_address ( ) . expect ( "Failed to get destination address" ) ;
530
531
let output_descriptors = & outputs. iter ( ) . collect :: < Vec < _ > > ( ) ;
531
532
let tx_feerate =
532
533
self . wallet . get_est_sat_per_1000_weight ( ConfirmationTarget :: Normal ) ;
Original file line number Diff line number Diff line change @@ -1086,7 +1086,9 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1086
1086
///
1087
1087
/// **Note:** This **MUST** be called after each event has been handled.
1088
1088
pub fn event_handled ( & self ) {
1089
- self . event_queue . event_handled ( ) . unwrap ( ) ;
1089
+ self . event_queue
1090
+ . event_handled ( )
1091
+ . expect ( "Couldn't mark event handled due to persistence failure" ) ;
1090
1092
}
1091
1093
1092
1094
/// Returns our own node id
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub(crate) struct FilesystemLogger {
17
17
impl FilesystemLogger {
18
18
pub ( crate ) fn new ( file_path : String , level : Level ) -> Self {
19
19
if let Some ( parent_dir) = Path :: new ( & file_path) . parent ( ) {
20
- fs:: create_dir_all ( parent_dir) . unwrap ( ) ;
20
+ fs:: create_dir_all ( parent_dir) . expect ( "Failed to create log parent directory" ) ;
21
21
}
22
22
Self { file_path, level }
23
23
}
@@ -40,8 +40,8 @@ impl Logger for FilesystemLogger {
40
40
. create ( true )
41
41
. append ( true )
42
42
. open ( self . file_path . clone ( ) )
43
- . unwrap ( )
43
+ . expect ( "Failed to open log file" )
44
44
. write_all ( log. as_bytes ( ) )
45
- . unwrap ( ) ;
45
+ . expect ( "Failed to write to log file" )
46
46
}
47
47
}
You can’t perform that action at this time.
0 commit comments