Repot and introduce keccak-256 external.

This commit is contained in:
Gav
2018-01-17 11:45:36 +01:00
parent 17c8bad87c
commit 98faf54ec4
24 changed files with 88 additions and 117 deletions
@@ -1,6 +1,7 @@
#[macro_use]
extern crate environmental;
extern crate polkadot_state_machine;
extern crate tiny_keccak;
pub use std::vec::Vec;
pub use std::rc::Rc;
@@ -75,6 +76,9 @@ pub fn chain_id() -> u64 {
).unwrap_or(0)
}
/// Conduct a Keccak-256 hash of the given data.
pub use tiny_keccak::keccak256;
/// Execute the given closure with global function available whose functionality routes into the
/// externalities `ext`. Forwards the value that the closure returns.
pub fn with_externalities<R, F: FnOnce() -> R>(ext: &mut Externalities<Error=NoError>, f: F) -> R {