Skip to content

Commit ae89b01

Browse files
committed
validator_worker - leader - call heartbeat()
1 parent be7ef35 commit ae89b01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

validator_worker/src/leader.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use primitives::adapter::Adapter;
44
use primitives::validator::{Accounting, MessageTypes, NewState};
55
use primitives::BalancesMap;
66

7+
use crate::heartbeat::heartbeat;
78
use crate::sentry_interface::SentryApi;
89
use crate::{get_state_root_hash, producer};
910

@@ -14,7 +15,8 @@ pub async fn tick<A: Adapter + 'static>(iface: &SentryApi<A>) -> Result<(), Box<
1415
on_new_accounting(&iface, (&balances, &new_accounting))?;
1516
}
1617

17-
Ok(())
18+
// TODO: Pass the heartbeat time from the Configuration
19+
await!(heartbeat(&iface, balances, 250)).map(|_| ())
1820
}
1921

2022
fn on_new_accounting<A: Adapter + 'static>(

0 commit comments

Comments
 (0)