mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 04:31:02 +00:00
frame/beefy: prune entries in set id session mapping (#13411)
Add limit for the number of entries in the `SetIdSession` mapping. For example, it can be set to the bonding duration (in sessions). Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
@@ -111,6 +111,7 @@ parameter_types! {
|
||||
pub const Period: u64 = 1;
|
||||
pub const ReportLongevity: u64 =
|
||||
BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * Period::get();
|
||||
pub const MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get();
|
||||
}
|
||||
|
||||
impl pallet_beefy::Config for Test {
|
||||
@@ -125,6 +126,7 @@ impl pallet_beefy::Config for Test {
|
||||
type HandleEquivocation =
|
||||
super::EquivocationHandler<u64, Self::KeyOwnerIdentification, Offences, ReportLongevity>;
|
||||
type MaxAuthorities = ConstU32<100>;
|
||||
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
|
||||
type OnNewValidatorSet = ();
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user