verify that GRANDPA pallet is not initialized before submitting initialization transaction (#1267)

* verify that GRANDPA pallet is not initialized before submitting initialization transaction

* spelling
This commit is contained in:
Svyatoslav Nikolsky
2021-12-23 14:28:39 +03:00
committed by Bastian Köcher
parent 988f6b1664
commit bb249eff15
22 changed files with 185 additions and 21 deletions
@@ -64,6 +64,20 @@ pub trait Chain: ChainBase + Clone {
type WeightToFee: WeightToFeePolynomial<Balance = Self::Balance>;
}
/// Substrate-based chain that is using direct GRANDPA finality from minimal relay-client point of
/// view.
///
/// Keep in mind that parachains are relying on relay chain GRANDPA, so they should not implement
/// this trait.
pub trait ChainWithGrandpa: Chain {
/// Name of the bridge GRANDPA pallet (used in `construct_runtime` macro call) that is deployed
/// at some other chain to bridge with this `ChainWithGrandpa`.
///
/// We assume that all chains that are bridging with this `ChainWithGrandpa` are using
/// the same name.
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str;
}
/// Substrate-based chain with messaging support from minimal relay-client point of view.
pub trait ChainWithMessages: Chain {
/// Name of the bridge messages pallet (used in `construct_runtime` macro call) that is deployed
+1 -1
View File
@@ -32,7 +32,7 @@ use std::time::Duration;
pub use crate::{
chain::{
AccountKeyPairOf, BlockWithJustification, CallOf, Chain, ChainWithBalances,
ChainWithMessages, SignParam, TransactionSignScheme, TransactionStatusOf,
ChainWithGrandpa, ChainWithMessages, SignParam, TransactionSignScheme, TransactionStatusOf,
UnsignedTransaction, WeightToFeeOf,
},
client::{ChainRuntimeVersion, Client, OpaqueGrandpaAuthoritiesSet, Subscription},