Enable Offchain Equalise (#5683)

* Master.into()

* Remove debug stuff

* Better license

* Migrate away from SimpleDispatchInfo

* Fix test

* Revert "Migrate away from SimpleDispatchInfo"

This reverts commit dbdd27fa19948f16bd17defdc01d3dd32986df11.

* Move to offchain randomness

* Fix tests

* Fix tests more
This commit is contained in:
Kian Paimani
2020-04-27 18:51:46 +02:00
committed by GitHub
parent 33d00692d8
commit ee54eff488
20 changed files with 635 additions and 373 deletions
@@ -165,7 +165,12 @@ impl offchain::Externalities for TestOffchainExt {
}
fn random_seed(&mut self) -> [u8; 32] {
unimplemented!("not needed in tests so far")
use rand::{SeedableRng, RngCore};
use rand::rngs::SmallRng;
let mut seed = [0u8; 32];
let mut small_rng = SmallRng::from_entropy();
small_rng.fill_bytes(&mut seed);
seed
}
fn local_storage_set(&mut self, kind: StorageKind, key: &[u8], value: &[u8]) {