diff --git a/customs/bitcoin/src/lib.rs b/customs/bitcoin/src/lib.rs index d703415a..8fd40b17 100644 --- a/customs/bitcoin/src/lib.rs +++ b/customs/bitcoin/src/lib.rs @@ -53,6 +53,7 @@ pub const MAX_REQUESTS_PER_BATCH: usize = 10; pub const BATCH_QUERY_LIMIT: u64 = 20; pub const INTERVAL_PROCESSING: Duration = Duration::from_secs(5); +pub const INTERVAL_QUERY_HUB: Duration = Duration::from_secs(60); pub const FEE_ESTIMATE_DELAY: Duration = Duration::from_secs(60 * 60); /// The minimum fee increment for transaction resubmission. diff --git a/customs/bitcoin/src/main.rs b/customs/bitcoin/src/main.rs index 18c1c507..021f3b34 100644 --- a/customs/bitcoin/src/main.rs +++ b/customs/bitcoin/src/main.rs @@ -15,7 +15,7 @@ use bitcoin_customs::updates::{ }; use bitcoin_customs::{ process_hub_msg_task, process_tx_task, refresh_fee_task, CustomsInfo, TokenResp, - FEE_ESTIMATE_DELAY, INTERVAL_PROCESSING, + FEE_ESTIMATE_DELAY, INTERVAL_PROCESSING, INTERVAL_QUERY_HUB, }; use bitcoin_customs::{ state::eventlog::{Event, GetEventsArg}, @@ -39,7 +39,7 @@ fn init(args: CustomArg) { lifecycle::init::init(args); set_timer_interval(INTERVAL_PROCESSING, process_tx_task); - set_timer_interval(INTERVAL_PROCESSING, process_hub_msg_task); + set_timer_interval(INTERVAL_QUERY_HUB, process_hub_msg_task); set_timer_interval(FEE_ESTIMATE_DELAY, refresh_fee_task); #[cfg(feature = "self_check")] @@ -106,7 +106,7 @@ fn post_upgrade(custom_arg: Option) { lifecycle::upgrade::post_upgrade(upgrade_arg); set_timer_interval(INTERVAL_PROCESSING, process_tx_task); - set_timer_interval(INTERVAL_PROCESSING, process_hub_msg_task); + set_timer_interval(INTERVAL_QUERY_HUB, process_hub_msg_task); set_timer_interval(FEE_ESTIMATE_DELAY, refresh_fee_task); } diff --git a/route/evm/src/lib.rs b/route/evm/src/lib.rs index b9994538..f2f39c78 100644 --- a/route/evm/src/lib.rs +++ b/route/evm/src/lib.rs @@ -43,7 +43,7 @@ pub mod const_args { pub const EVM_ADDR_BYTES_LEN: usize = 20; pub const PERIODIC_TASK_INTERVAL: u64 = 5; pub const BATCH_QUERY_LIMIT: u64 = 20; - pub const FETCH_HUB_TASK_INTERVAL: u64 = 10; + pub const FETCH_HUB_TASK_INTERVAL: u64 = 60; pub const FETCH_HUB_TASK_NAME: &str = "FETCH_HUB"; pub const SEND_EVM_TASK_INTERVAL: u64 = 20; pub const SEND_EVM_TASK_NAME: &str = "SEND_EVM"; diff --git a/route/icp/src/lib.rs b/route/icp/src/lib.rs index 733b5c3a..df805f23 100644 --- a/route/icp/src/lib.rs +++ b/route/icp/src/lib.rs @@ -17,7 +17,7 @@ pub mod state; pub mod storage; pub mod updates; -pub const PERIODIC_TASK_INTERVAL: u64 = 5; +pub const PERIODIC_TASK_INTERVAL: u64 = 60; pub const BATCH_QUERY_LIMIT: u64 = 20; pub const ICRC2_WASM: &[u8] = include_bytes!("../../../ic-icrc1-ledger.wasm"); pub const ICP_TRANSFER_FEE: u64 = 10_000;