Initial validator trait. (#14)

* Initial validator trait.

* Add missing docs warning.

* Fix formatting.

* Fix validator output and serialization.

* Get rid of redundant ValidationCode type.
This commit is contained in:
Tomasz Drwięga
2017-11-12 16:48:35 +01:00
committed by Robert Habermeier
parent 9d083be47a
commit e9177294f6
12 changed files with 520 additions and 52 deletions
+9 -1
View File
@@ -18,8 +18,9 @@
#![warn(missing_docs)]
extern crate serde;
extern crate rustc_hex;
extern crate serde;
extern crate tiny_keccak;
#[macro_use]
extern crate crunchy;
@@ -41,7 +42,14 @@ extern crate pretty_assertions;
mod bytes;
pub mod block;
pub mod hash;
pub mod parachain;
pub mod uint;
pub mod validator;
/// Alias to 160-bit hash when used in the context of an account address.
pub type Address = hash::H160;
/// A hash function.
pub fn hash(data: &[u8]) -> hash::H256 {
tiny_keccak::keccak256(data).into()
}