mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
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:
@@ -24,7 +24,7 @@ wasmi = { version = "0.6.2", optional = true }
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
hash256-std-hasher = { version = "0.15.2", default-features = false }
|
||||
base58 = { version = "0.1.0", optional = true }
|
||||
rand = { version = "0.7.2", optional = true }
|
||||
rand = { version = "0.7.3", optional = true, features = ["small_rng"] }
|
||||
substrate-bip39 = { version = "0.4.1", optional = true }
|
||||
tiny-bip39 = { version = "0.7", optional = true }
|
||||
regex = { version = "1.3.1", optional = true }
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user