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
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright 2019 Conflux Foundation. All rights reserved.
// Conflux is free software and distributed under GNU General Public License.
// See http://www.gnu.org/licenses/

#[macro_use]
extern crate log;
#[macro_use]
extern crate cfx_util_macros;
#[macro_use]
extern crate lazy_static;

use cfxkey as keylib;
use keccak_hash as hash;

#[macro_use]
pub mod message;

pub mod block_data_manager;
pub mod cache_config;
pub mod cache_manager;
pub mod channel;
pub mod client;
pub mod consensus;
mod core_error;
pub mod db;
pub mod errors;
pub mod genesis_block;
pub mod light_protocol;
pub mod node_type;
pub mod pos;
pub mod pow;
pub mod state_exposer;
pub mod statistics;
pub mod sync;
pub mod transaction_pool;
pub mod unique_id;
pub mod verification;

pub use crate::{
    block_data_manager::BlockDataManager,
    channel::Notifications,
    consensus::{
        BestInformation, ConsensusGraph, ConsensusGraphTrait,
        SharedConsensusGraph,
    },
    light_protocol::{
        Handler as LightHandler, Provider as LightProvider,
        QueryService as LightQueryService,
    },
    node_type::NodeType,
    sync::{
        SharedSynchronizationGraph, SharedSynchronizationService,
        SynchronizationGraph, SynchronizationService,
    },
    transaction_pool::{SharedTransactionPool, TransactionPool},
    unique_id::UniqueId,
};
pub use cfx_parameters::{
    block as block_parameters, consensus as consensus_parameters,
    consensus_internal as consensus_internal_parameters,
    sync as sync_parameters, WORKER_COMPUTATION_PARALLELISM,
};
pub use network::PeerInfo;

pub trait Stopable {
    fn stop(&self);
}