Adding storage_info to pallet grandpa (#9817)

Converting some `Vec` to `WeakBoundedVec`
Adding `MaxAuthorities` type to bound the `WeakBoundedVec`

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Georges
2021-09-22 10:42:57 +01:00
committed by GitHub
parent 24c6d149fc
commit 0fcc2ef68c
4 changed files with 42 additions and 10 deletions
+2
View File
@@ -230,6 +230,7 @@ impl pallet_offences::Config for Test {
parameter_types! {
pub const ReportLongevity: u64 =
BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * Period::get();
pub const MaxAuthorities: u32 = 100;
}
impl Config for Test {
@@ -250,6 +251,7 @@ impl Config for Test {
super::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
pub fn grandpa_log(log: ConsensusLog<u64>) -> DigestItem<H256> {