|
39 | 39 | use crate::weights::WeightInfo; |
40 | 40 |
|
41 | 41 | use bp_header_chain::justification::GrandpaJustification; |
| 42 | +use bp_header_chain::InitializationData; |
42 | 43 | use bp_runtime::{BlockNumberOf, Chain, HashOf, HasherOf, HeaderOf}; |
43 | | -use codec::{Decode, Encode}; |
44 | 44 | use finality_grandpa::voter_set::VoterSet; |
45 | 45 | use frame_support::ensure; |
46 | 46 | use frame_system::{ensure_signed, RawOrigin}; |
47 | | -#[cfg(feature = "std")] |
48 | | -use serde::{Deserialize, Serialize}; |
49 | 47 | use sp_finality_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID}; |
50 | 48 | use sp_runtime::traits::{BadOrigin, Header as HeaderT, Zero}; |
51 | | -use sp_runtime::RuntimeDebug; |
52 | 49 |
|
53 | 50 | #[cfg(test)] |
54 | 51 | mod mock; |
@@ -511,22 +508,6 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> { |
511 | 508 | } |
512 | 509 | } |
513 | 510 |
|
514 | | -/// Data required for initializing the bridge pallet. |
515 | | -/// |
516 | | -/// The bridge needs to know where to start its sync from, and this provides that initial context. |
517 | | -#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Clone)] |
518 | | -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] |
519 | | -pub struct InitializationData<H: HeaderT> { |
520 | | - /// The header from which we should start syncing. |
521 | | - pub header: H, |
522 | | - /// The initial authorities of the pallet. |
523 | | - pub authority_list: sp_finality_grandpa::AuthorityList, |
524 | | - /// The ID of the initial authority set. |
525 | | - pub set_id: sp_finality_grandpa::SetId, |
526 | | - /// Should the pallet block transaction immediately after initialization. |
527 | | - pub is_halted: bool, |
528 | | -} |
529 | | - |
530 | 511 | pub(crate) fn find_scheduled_change<H: HeaderT>(header: &H) -> Option<sp_finality_grandpa::ScheduledChange<H::Number>> { |
531 | 512 | use sp_runtime::generic::OpaqueDigestItemId; |
532 | 513 |
|
|
0 commit comments