Skip to content

Commit 1d92f9e

Browse files
committed
f explain why its okay to use a panicing spawner
1 parent d1cdd12 commit 1d92f9e

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
@@ -561,6 +561,9 @@ where
561561
kv_store: K, logger: L, maximum_pending_updates: u64, entropy_source: ES,
562562
signer_provider: SP, broadcaster: BI, fee_estimator: FE,
563563
) -> Self {
564+
// Note that calling the spawner only happens in the `pub(crate)` `spawn_*` methods defined
565+
// with additional bounds on `MonitorUpdatingPersisterAsync`. Thus its safe to provide a
566+
// dummy always-panic implementation here.
564567
MonitorUpdatingPersister(MonitorUpdatingPersisterAsync::new(
565568
KVStoreSyncWrapper(kv_store),
566569
PanicingSpawner,

0 commit comments

Comments
 (0)