babe, grandpa: set longevity for equivocation report transactions (#8076)

* babe: set longevity for equivocation report transactions

* grandpa: set longevity for equivocation report transaction

* babe, grandpa: fix tests

* node: add ReportLongevity to babe and grandpa modules

* node: bump spec_version
This commit is contained in:
André Silva
2021-02-10 13:51:36 +00:00
committed by GitHub
parent 8481e9a33a
commit c763df4bb1
7 changed files with 70 additions and 23 deletions
+7 -1
View File
@@ -226,6 +226,11 @@ impl pallet_offences::Config for Test {
type WeightSoftLimit = OffencesWeightSoftLimit;
}
parameter_types! {
pub const ReportLongevity: u64 =
BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * Period::get();
}
impl Config for Test {
type Event = Event;
type Call = Call;
@@ -240,7 +245,8 @@ impl Config for Test {
AuthorityId,
)>>::IdentificationTuple;
type HandleEquivocation = super::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
type HandleEquivocation =
super::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;
type WeightInfo = ();
}