1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use std::sync::Arc;
use futures::Future;
use parking_lot::{Mutex, RwLock};
use storage;
use local_node::LocalNode;
use miner::MemoryPool;
use super::SyncListener;
use synchronization_client::SynchronizationClient;
use synchronization_executor::LocalSynchronizationTaskExecutor;
use synchronization_peers::Peers;
use synchronization_server::ServerImpl;
use synchronization_verifier::AsyncVerifier;
use utils::SynchronizationState;
pub use utils::BlockHeight;
pub type RequestId = u32;
pub type PeerIndex = usize;
pub type EmptyBoxFuture = Box<Future<Item=(), Error=()> + Send>;
pub type StorageRef = storage::SharedStore;
pub type MemoryPoolRef = Arc<RwLock<MemoryPool>>;
pub type SynchronizationStateRef = Arc<SynchronizationState>;
pub type PeersRef = Arc<Peers>;
pub type ExecutorRef<T> = Arc<T>;
pub type ClientRef<T> = Arc<T>;
pub type ClientCoreRef<T> = Arc<Mutex<T>>;
pub type ServerRef<T> = Arc<T>;
pub type LocalNodeRef = Arc<LocalNode<LocalSynchronizationTaskExecutor, ServerImpl, SynchronizationClient<LocalSynchronizationTaskExecutor, AsyncVerifier>>>;
pub type SyncListenerRef = Box<SyncListener>;