@@ -32,7 +32,7 @@ use crate::sync::Arc;
3232use crate :: util:: logger:: Logger ;
3333use crate :: util:: ser:: { Readable , ReadableArgs , Writeable } ;
3434
35- use super :: async_poll:: AsyncResult ;
35+ use super :: async_poll:: { AsyncResult , AsyncResultType } ;
3636
3737/// The alphabet of characters allowed for namespaces and keys.
3838pub const KVSTORE_NAMESPACE_KEY_ALPHABET : & str =
@@ -143,7 +143,7 @@ pub trait KVStore {
143143 /// Asynchronously persists the given data under the given `key`.
144144 fn write_async (
145145 & self , primary_namespace : & str , secondary_namespace : & str , key : & str , buf : & [ u8 ] ,
146- ) -> AsyncResult < ' static , ( ) > ;
146+ ) -> AsyncResultType < ' static , ( ) , io :: Error > ;
147147 /// Removes any data that had previously been persisted under the given `key`.
148148 ///
149149 /// If the `lazy` flag is set to `true`, the backend implementation might choose to lazily
@@ -284,6 +284,7 @@ impl<ChannelSigner: EcdsaChannelSigner, K: KVStore + ?Sized + Sync + Send + 'sta
284284 & encoded,
285285 )
286286 . await
287+ . map_err ( |_| ( ) )
287288 } )
288289 }
289290
@@ -303,6 +304,7 @@ impl<ChannelSigner: EcdsaChannelSigner, K: KVStore + ?Sized + Sync + Send + 'sta
303304 & encoded,
304305 )
305306 . await
307+ . map_err ( |_| ( ) )
306308 } )
307309 }
308310
@@ -843,6 +845,7 @@ where
843845 & monitor_bytes,
844846 )
845847 . await
848+ . map_err ( |_| ( ) )
846849 }
847850
848851 /// Persists a channel update, writing only the update to the parameterized [`KVStore`] if possible.
@@ -873,6 +876,7 @@ where
873876 & update,
874877 )
875878 . await
879+ . map_err ( |_| ( ) )
876880 } else {
877881 // In case of channel-close monitor update, we need to read old monitor before persisting
878882 // the new one in order to determine the cleanup range.
0 commit comments