@@ -77,9 +77,9 @@ pub enum BuildError {
7777 /// The current system time is invalid, clocks might have gone backwards.
7878 InvalidSystemTime ,
7979 /// We failed to read data from the [`KVStore`].
80- IOReadFailed ,
80+ ReadFailed ,
8181 /// We failed to write data to the [`KVStore`].
82- IOWriteFailed ,
82+ WriteFailed ,
8383 /// We failed to access the given `storage_dir_path`.
8484 StoragePathAccessFailed ,
8585 /// We failed to setup the onchain wallet.
@@ -93,8 +93,8 @@ impl fmt::Display for BuildError {
9393 Self :: InvalidSystemTime => {
9494 write ! ( f, "System time is invalid. Clocks might have gone back in time." )
9595 }
96- Self :: IOReadFailed => write ! ( f, "Failed to read from store." ) ,
97- Self :: IOWriteFailed => write ! ( f, "Failed to write to store." ) ,
96+ Self :: ReadFailed => write ! ( f, "Failed to read from store." ) ,
97+ Self :: WriteFailed => write ! ( f, "Failed to write to store." ) ,
9898 Self :: StoragePathAccessFailed => write ! ( f, "Failed to access the given storage path." ) ,
9999 Self :: WalletSetupFailed => write ! ( f, "Failed to setup onchain wallet." ) ,
100100 }
@@ -469,7 +469,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
469469 if e. kind ( ) == std:: io:: ErrorKind :: NotFound {
470470 Arc :: new ( NetworkGraph :: new ( config. network , Arc :: clone ( & logger) ) )
471471 } else {
472- return Err ( BuildError :: IOReadFailed ) ;
472+ return Err ( BuildError :: ReadFailed ) ;
473473 }
474474 }
475475 } ;
@@ -489,7 +489,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
489489 Arc :: clone ( & logger) ,
490490 ) ) )
491491 } else {
492- return Err ( BuildError :: IOReadFailed ) ;
492+ return Err ( BuildError :: ReadFailed ) ;
493493 }
494494 }
495495 } ;
@@ -513,7 +513,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
513513 Vec :: new ( )
514514 } else {
515515 log_error ! ( logger, "Failed to read channel monitors: {}" , e. to_string( ) ) ;
516- return Err ( BuildError :: IOReadFailed ) ;
516+ return Err ( BuildError :: ReadFailed ) ;
517517 }
518518 }
519519 } ;
@@ -548,7 +548,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
548548 let ( _hash, channel_manager) =
549549 <( BlockHash , ChannelManager < K > ) >:: read ( & mut reader, read_args) . map_err ( |e| {
550550 log_error ! ( logger, "Failed to read channel manager from KVStore: {}" , e) ;
551- BuildError :: IOReadFailed
551+ BuildError :: ReadFailed
552552 } ) ?;
553553 channel_manager
554554 } else {
@@ -611,7 +611,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
611611 Arc :: clone ( & kv_store) ,
612612 Arc :: clone ( & logger) ,
613613 )
614- . map_err ( |_| BuildError :: IOWriteFailed ) ?;
614+ . map_err ( |_| BuildError :: WriteFailed ) ?;
615615 p2p_source
616616 }
617617 GossipSourceConfig :: RapidGossipSync ( rgs_server) => {
@@ -662,7 +662,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
662662 Arc :: new ( PaymentStore :: new ( payments, Arc :: clone ( & kv_store) , Arc :: clone ( & logger) ) )
663663 }
664664 Err ( _) => {
665- return Err ( BuildError :: IOReadFailed ) ;
665+ return Err ( BuildError :: ReadFailed ) ;
666666 }
667667 } ;
668668
@@ -673,7 +673,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
673673 if e. kind ( ) == std:: io:: ErrorKind :: NotFound {
674674 Arc :: new ( EventQueue :: new ( Arc :: clone ( & kv_store) , Arc :: clone ( & logger) ) )
675675 } else {
676- return Err ( BuildError :: IOReadFailed ) ;
676+ return Err ( BuildError :: ReadFailed ) ;
677677 }
678678 }
679679 } ;
@@ -684,7 +684,7 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
684684 if e. kind ( ) == std:: io:: ErrorKind :: NotFound {
685685 Arc :: new ( PeerStore :: new ( Arc :: clone ( & kv_store) , Arc :: clone ( & logger) ) )
686686 } else {
687- return Err ( BuildError :: IOReadFailed ) ;
687+ return Err ( BuildError :: ReadFailed ) ;
688688 }
689689 }
690690 } ;
0 commit comments