Custom justification verification (#979)

* custom justification verification

* is_ancestor -> ensure_descendant

* PrecommitIsNotCommitDescendant

* Update primitives/header-chain/src/justification.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Svyatoslav Nikolsky
2021-05-31 21:58:45 +03:00
committed by Bastian Köcher
parent 6301ae0636
commit 700d63672b
5 changed files with 484 additions and 127 deletions
+2 -1
View File
@@ -177,7 +177,8 @@ fn generate_chain<H: HeaderT>(fork_id: u8, depth: u32, ancestor: &H) -> Vec<H> {
headers
}
fn signed_precommit<H: HeaderT>(
/// Create signed precommit with given target.
pub fn signed_precommit<H: HeaderT>(
signer: &Account,
target: (H::Hash, H::Number),
round: u64,