Browse Source

Sync with Olivia every 5 seconds

We are only making requests to Olivia that are absolutely necessary,
i.e. only fetch attestations when they are likely ready and only
fetch attestations that we definitely need.

As a result, we can trigger the sync much more frequent.

Fixes #349.
testing
Thomas Eizinger 3 years ago
parent
commit
fc2b5fe482
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 2
      daemon/src/maker.rs
  2. 2
      daemon/src/taker.rs

2
daemon/src/maker.rs

@ -257,7 +257,7 @@ async fn main() -> Result<()> {
tokio::spawn(
oracle_actor_context
.notify_interval(Duration::from_secs(60), || oracle::Sync)
.notify_interval(Duration::from_secs(5), || oracle::Sync)
.unwrap(),
);
let actor = fan_out::Actor::new(&[&cfd_maker_actor_inbox, &monitor_actor_address])

2
daemon/src/taker.rs

@ -251,7 +251,7 @@ async fn main() -> Result<()> {
tokio::spawn(wallet_sync::new(wallet, wallet_feed_sender));
tokio::spawn(
oracle_actor_context
.notify_interval(Duration::from_secs(60), || oracle::Sync)
.notify_interval(Duration::from_secs(5), || oracle::Sync)
.unwrap(),
);
let actor = fan_out::Actor::new(&[&cfd_actor_inbox, &monitor_actor_address])

Loading…
Cancel
Save