Function finality_grandpa::validate_commit [−][src]
pub fn validate_commit<H, N, S, I, C: Chain<H, N>>(
commit: &Commit<H, N, S, I>,
voters: &VoterSet<I>,
chain: &C
) -> Result<CommitValidationResult<H, N>, Error> where
H: Clone + Eq + Ord + Debug,
N: Copy + BlockNumberOps + Debug,
I: Clone + Ord + Eq + Debug,
S: Clone + Eq,
Validates a GRANDPA commit message and returns the ghost calculated using the precommits in the commit message and using the commit target as a base.
Signatures on precommits are assumed to have been checked.
Duplicate votes or votes from voters not in the voter-set will be ignored, but it is recommended for the caller of this function to remove those at signature-verification time.