verify that GRANDPA pallet is not initialized before submitting initialization transaction (#1267)

* verify that GRANDPA pallet is not initialized before submitting initialization transaction

* spelling
This commit is contained in:
Svyatoslav Nikolsky
2021-12-23 14:28:39 +03:00
committed by Bastian Köcher
parent 988f6b1664
commit bb249eff15
22 changed files with 185 additions and 21 deletions
+12 -1
View File
@@ -626,7 +626,10 @@ mod tests {
JustificationGeneratorParams, ALICE, BOB,
};
use codec::Encode;
use frame_support::{assert_err, assert_noop, assert_ok, weights::PostDispatchInfo};
use frame_support::{
assert_err, assert_noop, assert_ok, storage::generator::StorageValue,
weights::PostDispatchInfo,
};
use sp_runtime::{Digest, DigestItem, DispatchError};
fn initialize_substrate_bridge() {
@@ -1145,4 +1148,12 @@ mod tests {
);
})
}
#[test]
fn storage_keys_computed_properly() {
assert_eq!(
BestFinalized::<TestRuntime>::storage_value_final_key().to_vec(),
bp_header_chain::storage_keys::best_finalized_hash_key("Grandpa").0,
);
}
}