File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -553,7 +553,8 @@ where
553553 }
554554 LdkEvent :: SpendableOutputs { outputs } => {
555555 // 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" ) ;
557558 let output_descriptors = & outputs. iter ( ) . collect :: < Vec < _ > > ( ) ;
558559 let tx_feerate =
559560 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 {
10621062 ///
10631063 /// **Note:** This **MUST** be called after each event has been handled.
10641064 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" ) ;
10661068 }
10671069
10681070 /// Returns our own node id
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub(crate) struct FilesystemLogger {
1515impl FilesystemLogger {
1616 pub ( crate ) fn new ( file_path : String ) -> Self {
1717 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" ) ;
1919 }
2020 Self { file_path }
2121 }
@@ -35,8 +35,8 @@ impl Logger for FilesystemLogger {
3535 . create ( true )
3636 . append ( true )
3737 . open ( self . file_path . clone ( ) )
38- . unwrap ( )
38+ . expect ( "Failed to open log file" )
3939 . write_all ( log. as_bytes ( ) )
40- . unwrap ( ) ;
40+ . expect ( "Failed to write to log file" )
4141 }
4242}
You can’t perform that action at this time.
0 commit comments