Use runtime storage in PoA -> Substrate module tests (#103)

* removeInMemoryStorage + extract Kovan stuff to runtime

* removed comment from the future

* remove redundant conversions

* remove redundant `u8 as usize`

* remove redundant `u8 as usize`

* Update modules/ethereum/src/mock.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* use hex-literal in kovan config

* cargo fmt --all

* extracted insert_header

* cargo fmt --all

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Svyatoslav Nikolsky
2020-06-01 17:51:12 +03:00
committed by Bastian Köcher
parent 7fb99cd575
commit a6a86c21bb
11 changed files with 689 additions and 875 deletions
+1 -2
View File
@@ -254,7 +254,6 @@ pub fn step_validator(header_validators: &[Address], header_step: u64) -> Addres
#[cfg(test)]
pub(crate) mod tests {
use super::*;
use crate::kovan_validators_config;
use primitives::TransactionOutcome;
pub(crate) fn validators_change_recept(parent_hash: H256) -> Receipt {
@@ -314,7 +313,7 @@ pub(crate) mod tests {
#[test]
fn maybe_signals_validators_change_works() {
// when contract is active, but bloom has no required bits set
let config = kovan_validators_config();
let config = ValidatorsConfiguration::Single(ValidatorsSource::Contract(Default::default(), Vec::new()));
let validators = Validators::new(&config);
let mut header = Header::default();
header.number = u64::max_value();