cfxcore/
lib.rs

1// Copyright 2019 Conflux Foundation. All rights reserved.
2// Conflux is free software and distributed under GNU General Public License.
3// See http://www.gnu.org/licenses/
4
5#[macro_use]
6extern crate log;
7#[macro_use]
8extern crate cfx_util_macros;
9#[macro_use]
10extern crate lazy_static;
11
12use cfxkey as keylib;
13use keccak_hash as hash;
14
15#[macro_use]
16pub mod message;
17
18pub mod block_data_manager;
19pub mod client;
20pub mod consensus;
21pub mod db;
22pub mod errors;
23pub mod genesis_block;
24pub mod light_protocol;
25pub mod pos;
26pub mod statistics;
27pub mod sync;
28pub mod transaction_pool;
29pub mod verification;
30
31pub use cfxcore_pow as pow;
32pub use cfxcore_types::{
33    cache_config, cache_manager, channel, core_error, node_type, state_exposer,
34    unique_id,
35};
36
37pub use crate::{
38    block_data_manager::BlockDataManager,
39    channel::Notifications,
40    consensus::{BestInformation, ConsensusGraph, SharedConsensusGraph},
41    light_protocol::{
42        Handler as LightHandler, Provider as LightProvider,
43        QueryService as LightQueryService,
44    },
45    node_type::NodeType,
46    sync::{
47        SharedSynchronizationGraph, SharedSynchronizationService,
48        SynchronizationGraph, SynchronizationService,
49    },
50    transaction_pool::{SharedTransactionPool, TransactionPool},
51    unique_id::UniqueId,
52};
53pub use cfx_parameters::{
54    block as block_parameters, consensus as consensus_parameters,
55    consensus_internal as consensus_internal_parameters,
56    sync as sync_parameters, WORKER_COMPUTATION_PARALLELISM,
57};
58pub use network::PeerInfo;
59
60pub trait Stopable {
61    fn stop(&self);
62}