move cht module up a level
This commit is contained in:
parent
bac6293309
commit
31aae4ed78
@ -20,3 +20,8 @@ pub const SIZE: u64 = 2048;
|
|||||||
pub fn block_to_cht_number(block_num: u64) -> u64 {
|
pub fn block_to_cht_number(block_num: u64) -> u64 {
|
||||||
(block_num + 1) / SIZE
|
(block_num + 1) / SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the starting block of a given CHT.
|
||||||
|
pub fn start_number(cht_num: u64) -> u64 {
|
||||||
|
(cht_num * SIZE) + 1
|
||||||
|
}
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
use std::collections::{BTreeMap, HashMap};
|
use std::collections::{BTreeMap, HashMap};
|
||||||
|
|
||||||
use client::cht;
|
use cht;
|
||||||
|
|
||||||
use ethcore::block_status::BlockStatus;
|
use ethcore::block_status::BlockStatus;
|
||||||
use ethcore::error::BlockError;
|
use ethcore::error::BlockError;
|
||||||
|
@ -39,8 +39,6 @@ use self::header_chain::HeaderChain;
|
|||||||
|
|
||||||
pub use self::service::Service;
|
pub use self::service::Service;
|
||||||
|
|
||||||
pub mod cht;
|
|
||||||
|
|
||||||
mod header_chain;
|
mod header_chain;
|
||||||
mod service;
|
mod service;
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
pub mod client;
|
pub mod client;
|
||||||
|
pub mod cht;
|
||||||
pub mod net;
|
pub mod net;
|
||||||
pub mod on_demand;
|
pub mod on_demand;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user