Remove BlockNumber <-> u64 conversions from light-client related code (#2666)

* Remove As usage from CHT

* Remove As usage from CHT (continue)

* Restrict BN <-> int conversions in CT

* more BN <-> u64 conversions removed

* upd spec_version

* Apply suggestions from code review

Co-Authored-By: Gavin Wood <github@gavwood.com>

* Apply suggestions from code review

Co-Authored-By: Gavin Wood <github@gavwood.com>

* more grumbles

* fix last grumbles + compilation

* too long lines

* too long lines
This commit is contained in:
Svyatoslav Nikolsky
2019-05-28 16:07:16 +03:00
committed by Gavin Wood
parent 25b88f1a1f
commit 549d9e1da1
41 changed files with 1087 additions and 654 deletions
+6 -2
View File
@@ -138,7 +138,7 @@ export_api! {
fn child_storage_root(storage_key: &[u8]) -> Vec<u8>;
/// "Commit" all existing operations and get the resultant storage change root.
fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option<[u8; 32]>;
fn storage_changes_root(parent_hash: [u8; 32]) -> Option<[u8; 32]>;
/// A trie root formed from the enumerated items.
/// TODO [#2382] remove (just use `ordered_trie_root` (NOTE currently not implemented for without_std))
@@ -251,6 +251,10 @@ mod imp {
}
#[cfg(feature = "std")]
pub use self::imp::{StorageOverlay, ChildrenStorageOverlay, with_storage, with_externalities, TestExternalities};
pub use self::imp::{StorageOverlay, ChildrenStorageOverlay, with_storage, with_externalities};
#[cfg(not(feature = "std"))]
pub use self::imp::ext::*;
/// Type alias for Externalities implementation used in tests.
#[cfg(feature = "std")]
pub type TestExternalities<H> = self::imp::TestExternalities<H, u64>;