frame: remove finality-tracker (#7228)

* frame: remove finality-tracker

* node: remove unused parameter types

* node: bump spec_version
This commit is contained in:
André Silva
2020-10-15 21:58:51 +01:00
committed by GitHub
parent 8e8a37f7a1
commit f3ea1624f6
22 changed files with 21 additions and 638 deletions
-2
View File
@@ -27,7 +27,6 @@ frame-support = { version = "2.0.0", default-features = false, path = "../suppor
frame-system = { version = "2.0.0", default-features = false, path = "../system" }
pallet-authorship = { version = "2.0.0", default-features = false, path = "../authorship" }
pallet-session = { version = "2.0.0", default-features = false, path = "../session" }
pallet-finality-tracker = { version = "2.0.0", default-features = false, path = "../finality-tracker" }
[dev-dependencies]
frame-benchmarking = { version = "2.0.0", path = "../benchmarking" }
@@ -57,6 +56,5 @@ std = [
"frame-system/std",
"pallet-authorship/std",
"pallet-session/std",
"pallet-finality-tracker/std",
]
runtime-benchmarks = ["frame-benchmarking"]
+7 -10
View File
@@ -44,7 +44,6 @@ use frame_support::{
storage, traits::KeyOwnerProofSystem, weights::{Pays, Weight}, Parameter,
};
use frame_system::{ensure_none, ensure_root, ensure_signed};
use pallet_finality_tracker::OnFinalizationStalled;
use sp_runtime::{
generic::DigestItem,
traits::Zero,
@@ -575,6 +574,13 @@ impl<T: Trait> Module<T> {
)
.ok()
}
fn on_stalled(further_wait: T::BlockNumber, median: T::BlockNumber) {
// when we record old authority sets we could try to figure out _who_
// failed. until then, we can't meaningfully guard against
// `next == last` the way that normal session changes do.
<Stalled<T>>::put((further_wait, median));
}
}
impl<T: Trait> sp_runtime::BoundToRuntimeAppPublic for Module<T> {
@@ -635,12 +641,3 @@ impl<T: Trait> pallet_session::OneSessionHandler<T::AccountId> for Module<T>
Self::deposit_log(ConsensusLog::OnDisabled(i as u64))
}
}
impl<T: Trait> OnFinalizationStalled<T::BlockNumber> for Module<T> {
fn on_stalled(further_wait: T::BlockNumber, median: T::BlockNumber) {
// when we record old authority sets, we can use `pallet_finality_tracker::median`
// to figure out _who_ failed. until then, we can't meaningfully guard
// against `next == last` the way that normal session changes do.
<Stalled<T>>::put((further_wait, median));
}
}