Skip to content

Commit 5594560

Browse files
committed
Handle output tracking failure in SpendableOutputs.
1 parent 7befec7 commit 5594560

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/event.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -935,12 +935,13 @@ where
935935
}
936936
},
937937
LdkEvent::SpendableOutputs { outputs, channel_id } => {
938-
self.output_sweeper
939-
.track_spendable_outputs(outputs, channel_id, true, None)
940-
.unwrap_or_else(|_| {
938+
match self.output_sweeper.track_spendable_outputs(outputs, channel_id, true, None) {
939+
Ok(_) => return Ok(()),
940+
Err(_) => {
941941
log_error!(self.logger, "Failed to track spendable outputs");
942-
panic!("Failed to track spendable outputs");
943-
});
942+
return Err(ReplayEvent());
943+
},
944+
};
944945
},
945946
LdkEvent::OpenChannelRequest {
946947
temporary_channel_id,

0 commit comments

Comments
 (0)