Skip to content

Commit eb52126

Browse files
committed
Handle output tracking failure in SpendableOutputs.
1 parent d439f1b commit eb52126

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/event.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -933,12 +933,16 @@ where
933933
}
934934
},
935935
LdkEvent::SpendableOutputs { outputs, channel_id } => {
936-
self.output_sweeper
936+
return match self
937+
.output_sweeper
937938
.track_spendable_outputs(outputs, channel_id, true, None)
938-
.unwrap_or_else(|_| {
939+
{
940+
Ok(_) => Ok(()),
941+
Err(_) => {
939942
log_error!(self.logger, "Failed to track spendable outputs");
940-
panic!("Failed to track spendable outputs");
941-
});
943+
Err(ReplayEvent())
944+
},
945+
};
942946
},
943947
LdkEvent::OpenChannelRequest {
944948
temporary_channel_id,

0 commit comments

Comments
 (0)