move cht module up a level

This commit is contained in:
Robert Habermeier 2017-01-16 16:55:23 +01:00
parent bac6293309
commit 31aae4ed78
4 changed files with 7 additions and 3 deletions

View File

@ -20,3 +20,8 @@ pub const SIZE: u64 = 2048;
pub fn block_to_cht_number(block_num: u64) -> u64 {
(block_num + 1) / SIZE
}
/// Get the starting block of a given CHT.
pub fn start_number(cht_num: u64) -> u64 {
(cht_num * SIZE) + 1
}

View File

@ -28,7 +28,7 @@
use std::collections::{BTreeMap, HashMap};
use client::cht;
use cht;
use ethcore::block_status::BlockStatus;
use ethcore::error::BlockError;

View File

@ -39,8 +39,6 @@ use self::header_chain::HeaderChain;
pub use self::service::Service;
pub mod cht;
mod header_chain;
mod service;

View File

@ -33,6 +33,7 @@
#![deny(missing_docs)]
pub mod client;
pub mod cht;
pub mod net;
pub mod on_demand;