From b467f38700ab79d625fbc8a387c5f31f04f8ecbb Mon Sep 17 00:00:00 2001 From: bonomat Date: Mon, 6 Dec 2021 11:00:45 +1100 Subject: [PATCH 1/2] Settle CFDs every 2h --- daemon/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/src/lib.rs b/daemon/src/lib.rs index 566667c..57e7e22 100644 --- a/daemon/src/lib.rs +++ b/daemon/src/lib.rs @@ -75,7 +75,7 @@ pub const N_PAYOUTS: usize = 200; /// - How the oracle event id is chosen when creating an order (maker) /// - The sliding window of cached oracle announcements (maker, taker) /// - The auto-rollover time-window (taker) -pub const SETTLEMENT_INTERVAL: time::Duration = time::Duration::hours(24); +pub const SETTLEMENT_INTERVAL: time::Duration = time::Duration::hours(2); /// Struct controlling the lifetime of the async tasks, /// such as running actors and periodic notifications. From 0660f1ec8c4170cb025e0dd7c1a9091e3cf7397d Mon Sep 17 00:00:00 2001 From: bonomat Date: Mon, 6 Dec 2021 11:31:34 +1100 Subject: [PATCH 2/2] Log CFD timeout on start for debugging purposes --- daemon/src/maker.rs | 4 ++++ daemon/src/taker.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/daemon/src/maker.rs b/daemon/src/maker.rs index fc8afe1..332156a 100644 --- a/daemon/src/maker.rs +++ b/daemon/src/maker.rs @@ -140,6 +140,10 @@ async fn main() -> Result<()> { logger::init(opts.log_level, opts.json).context("initialize logger")?; tracing::info!("Running version: {}", env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT")); + tracing::info!( + "CFDs created with this release will settle after {} hours", + SETTLEMENT_INTERVAL.whole_hours() + ); let data_dir = opts .data_dir diff --git a/daemon/src/taker.rs b/daemon/src/taker.rs index 9f93899..eb6b0c0 100644 --- a/daemon/src/taker.rs +++ b/daemon/src/taker.rs @@ -149,6 +149,10 @@ async fn main() -> Result<()> { logger::init(opts.log_level, opts.json).context("initialize logger")?; tracing::info!("Running version: {}", env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT")); + tracing::info!( + "CFDs created with this release will settle after {} hours", + SETTLEMENT_INTERVAL.whole_hours() + ); let data_dir = opts .data_dir