mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-12 05:15:44 +00:00
Tunable Justification Generator (#835)
* Add way to create tunable GRANDPA justifications * Use new function in tests * Allow multiple authorities on a single fork * Only store pre-commit targets instead of full ancestry chains * Rename precommit_header to be more generic * Push new digest item instead of overriding entire digest * Ensure that we generate chains with non-zero length * Extract justification creation parameters into struct * Appease Clippy
This commit is contained in:
committed by
Bastian Köcher
parent
4105575794
commit
1c7b5d1b30
@@ -60,7 +60,7 @@ use crate::verifier::*;
|
||||
use crate::{BestFinalized, BestHeight, BridgeStorage, NextScheduledChange, PalletStorage};
|
||||
use bp_header_chain::AuthoritySet;
|
||||
use bp_test_utils::{
|
||||
authority_list, keyring, make_justification_for_header,
|
||||
authority_list, make_default_justification,
|
||||
Keyring::{Alice, Bob},
|
||||
};
|
||||
use codec::Encode;
|
||||
@@ -457,9 +457,7 @@ where
|
||||
// `grandpa_round`).
|
||||
//
|
||||
// See for more: https://github.com/paritytech/parity-bridges-common/issues/430
|
||||
let grandpa_round = 1;
|
||||
let set_id = 1;
|
||||
let justification = make_justification_for_header(header, grandpa_round, set_id, &keyring()).encode();
|
||||
let justification = make_default_justification(header).encode();
|
||||
|
||||
let res = verifier
|
||||
.import_finality_proof(header.hash(), justification.into())
|
||||
|
||||
Reference in New Issue
Block a user