Browse Source
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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
9 additions and
1 deletions
daemon/src/lib.rs
daemon/src/maker.rs
daemon/src/taker.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.
@ -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
@ -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