Browse Source

Merge #802

802: Settle CFDs every 2h r=bonomat a=bonomat

Temporarily reduce the settlement interval to 2h to accelerate testing. 

Co-authored-by: bonomat <philipp@hoenisch.at>
feature/force-stop-button
bors[bot] 3 years ago
committed by GitHub
parent
commit
917c9e8769
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      daemon/src/lib.rs
  2. 4
      daemon/src/maker.rs
  3. 4
      daemon/src/taker.rs

2
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.

4
daemon/src/maker.rs

@ -139,6 +139,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

4
daemon/src/taker.rs

@ -148,6 +148,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

Loading…
Cancel
Save