@@ -198,6 +198,9 @@ const RGS_SYNC_INTERVAL: Duration = Duration::from_secs(60 * 60);
198198// The time in-between node announcement broadcast attempts.
199199const NODE_ANN_BCAST_INTERVAL : Duration = Duration :: from_secs ( 60 * 60 ) ;
200200
201+ // The lower limit which we apply to any configured wallet sync intervals.
202+ const WALLET_SYNC_INTERVAL_MINIMUM_SECS : u64 = 10 ;
203+
201204// The length in bytes of our wallets' keys seed.
202205const WALLET_KEYS_SEED_LEN : usize = 64 ;
203206
@@ -786,7 +789,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
786789 let sync_logger = Arc :: clone ( & self . logger ) ;
787790 let mut stop_sync = self . stop_receiver . clone ( ) ;
788791 let onchain_wallet_sync_interval_secs =
789- self . config . onchain_wallet_sync_interval_secs . max ( 10 ) ;
792+ self . config . onchain_wallet_sync_interval_secs . max ( WALLET_SYNC_INTERVAL_MINIMUM_SECS ) ;
790793 std:: thread:: spawn ( move || {
791794 tokio:: runtime:: Builder :: new_current_thread ( ) . enable_all ( ) . build ( ) . unwrap ( ) . block_on (
792795 async move {
@@ -828,7 +831,8 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
828831 let sync_cmon = Arc :: clone ( & self . chain_monitor ) ;
829832 let sync_logger = Arc :: clone ( & self . logger ) ;
830833 let mut stop_sync = self . stop_receiver . clone ( ) ;
831- let wallet_sync_interval_secs = self . config . wallet_sync_interval_secs . max ( 10 ) ;
834+ let wallet_sync_interval_secs =
835+ self . config . wallet_sync_interval_secs . max ( WALLET_SYNC_INTERVAL_MINIMUM_SECS ) ;
832836 runtime. spawn ( async move {
833837 let mut wallet_sync_interval =
834838 tokio:: time:: interval ( Duration :: from_secs ( wallet_sync_interval_secs) ) ;
0 commit comments