Introduce efficient Hash-based RNG streamer (#4169)

* Introduce efficient Hash-based RNG streamer

* Loop in the case of being in bias space.

* Fix tests

* Minor cleanup
This commit is contained in:
Gavin Wood
2019-11-26 13:27:15 +01:00
committed by Robert Habermeier
parent 9ead395bff
commit 70bc6eaed6
3 changed files with 114 additions and 1 deletions
@@ -52,6 +52,7 @@ pub mod offchain;
pub mod testing;
pub mod traits;
pub mod transaction_validity;
pub mod random_number_generator;
/// Re-export these since they're only "kind of" generic.
pub use generic::{DigestItem, Digest};
@@ -70,6 +71,8 @@ pub use arithmetic::helpers_128bit;
/// Re-export big_uint stuff.
pub use arithmetic::biguint;
pub use random_number_generator::RandomNumberGenerator;
/// An abstraction over justification for a block's validity under a consensus algorithm.
///
/// Essentially a finality proof. The exact formulation will vary between consensus