Skip to content

Commit 6877e6d

Browse files
committed
f explain why its okay to use a panicing spawner
1 parent 7158218 commit 6877e6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/util/persist.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ where
560560
kv_store: K, logger: L, maximum_pending_updates: u64, entropy_source: ES,
561561
signer_provider: SP, broadcaster: BI, fee_estimator: FE,
562562
) -> Self {
563+
// Note that calling the spawner only happens in the `pub(crate)` `spawn_*` methods defined
564+
// with additional bounds on `MonitorUpdatingPersisterAsync`. Thus its safe to provide a
565+
// dummy always-panic implementation here.
563566
MonitorUpdatingPersister(MonitorUpdatingPersisterAsync::new(
564567
KVStoreSyncWrapper(kv_store),
565568
PanicingSpawner,

0 commit comments

Comments
 (0)