mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Preparing light client structure [v2] (#150)
* light client structure + remote call requests
This commit is contained in:
committed by
GitHub
parent
ab7eae6f88
commit
fa642cf01a
@@ -23,12 +23,18 @@ use tokio_core::reactor;
|
||||
use network::{SyncState, SyncProvider};
|
||||
use runtime_support::Hashable;
|
||||
use primitives::block::HeaderHash;
|
||||
use client::BlockchainEvents;
|
||||
use state_machine;
|
||||
use client::{self, BlockchainEvents};
|
||||
|
||||
const TIMER_INTERVAL_MS: u64 = 5000;
|
||||
|
||||
/// Spawn informant on the event loop
|
||||
pub fn start(service: &Service, handle: reactor::Handle) {
|
||||
pub fn start<B, E>(service: &Service<B, E>, handle: reactor::Handle)
|
||||
where
|
||||
B: client::backend::Backend + Send + Sync + 'static,
|
||||
E: client::CallExecutor + Send + Sync + 'static,
|
||||
client::error::Error: From<<<B as client::backend::Backend>::State as state_machine::backend::Backend>::Error>
|
||||
{
|
||||
let interval = reactor::Interval::new_at(Instant::now(), Duration::from_millis(TIMER_INTERVAL_MS), &handle)
|
||||
.expect("Error creating informant timer");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user