grandpa: missing equivocation reporting nits (#5953)

* primitives: move reporting key type to common key types

* session: remove useless methods on MembershipProof

* grandpa: remove std special-casing when checking signatures

* grandpa: add some more docs

* grandpa: use proper error types rather than strings
This commit is contained in:
André Silva
2020-05-12 12:17:33 +01:00
committed by GitHub
parent 871761694e
commit ab208837fa
6 changed files with 32 additions and 41 deletions
+8 -2
View File
@@ -29,6 +29,12 @@
//! And in a runtime context, so that the GRANDPA module can validate the
//! equivocation proofs in the extrinsic and report the offences.
//!
//! IMPORTANT:
//! When using this module for enabling equivocation reporting it is required
//! that the `ValidateEquivocationReport` signed extension is used in the runtime
//! definition. Failure to do so will allow invalid equivocation reports to be
//! accepted by the runtime.
//!
use sp_std::prelude::*;
@@ -395,12 +401,12 @@ impl GetValidatorCount for frame_support::Void {
impl GetSessionNumber for sp_session::MembershipProof {
fn session(&self) -> SessionIndex {
self.session()
self.session
}
}
impl GetValidatorCount for sp_session::MembershipProof {
fn validator_count(&self) -> sp_session::ValidatorCount {
self.validator_count()
self.validator_count
}
}