File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -863,6 +863,8 @@ where
863863 monitor : & ChannelMonitor < <SP :: Target as SignerProvider >:: EcdsaSigner > ,
864864 ) {
865865 let inner = Arc :: clone ( & self . 0 ) ;
866+ // Note that `persist_new_channel` is a sync method which calls all the way through to the
867+ // sync KVStore::write method (which returns a future) to ensure writes are well-ordered.
866868 let future = inner. persist_new_channel ( monitor_name, monitor) ;
867869 let channel_id = monitor. channel_id ( ) ;
868870 let completion = ( monitor. channel_id ( ) , monitor. get_latest_update_id ( ) ) ;
@@ -884,6 +886,8 @@ where
884886 monitor : & ChannelMonitor < <SP :: Target as SignerProvider >:: EcdsaSigner > ,
885887 ) {
886888 let inner = Arc :: clone ( & self . 0 ) ;
889+ // Note that `update_persisted_channel` is a sync method which calls all the way through to
890+ // the sync KVStore::write method (which returns a future) to ensure writes are well-ordered
887891 let future = inner. update_persisted_channel ( monitor_name, update, monitor) ;
888892 let channel_id = monitor. channel_id ( ) ;
889893 let completion = if let Some ( update) = update {
You can’t perform that action at this time.
0 commit comments