mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-04 01:07:23 +00:00
Move justification code to primitives crate (#640)
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
0280400e30
commit
c6df9924e4
@@ -54,11 +54,11 @@
|
||||
//! Import a finality proof for header 2 on fork 1. This finalty proof should fail to be imported
|
||||
//! because the header is an old header.
|
||||
|
||||
use crate::justification::tests::*;
|
||||
use crate::mock::{helpers::*, *};
|
||||
use crate::mock::*;
|
||||
use crate::storage::{AuthoritySet, ImportedHeader};
|
||||
use crate::verifier::*;
|
||||
use crate::{BestFinalized, BestHeight, BridgeStorage, NextScheduledChange, PalletStorage};
|
||||
use bp_test_utils::{alice, authority_list, bob, make_justification_for_header};
|
||||
use codec::Encode;
|
||||
use frame_support::{IterableStorageMap, StorageValue};
|
||||
use sp_finality_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID};
|
||||
@@ -456,8 +456,7 @@ where
|
||||
let grandpa_round = 1;
|
||||
let set_id = 1;
|
||||
let authorities = authority_list();
|
||||
let justification =
|
||||
make_justification_for_header(&header, grandpa_round, set_id, &authorities).encode();
|
||||
let justification = make_justification_for_header(header, grandpa_round, set_id, &authorities).encode();
|
||||
|
||||
let res = verifier
|
||||
.import_finality_proof(header.hash(), justification.into())
|
||||
|
||||
Reference in New Issue
Block a user