mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
Add GenesisConfig for Millau and Rialto Runtimes (#401)
* Add Rialto as a target for the Millau node * Rename Rialto module to Rialto-PoA This will reduce confusion as the Millau runtime has a Rialto module as well which refers to the Substrate chain. * Add Millau as a target for the Rialto node * Be more explicit about Rialto PoA related code * Missed some name changes in the Ethereum PoA relay * Re-export Substrate pallet structs used by node * Remove `first_scheduled_change` of Millau in Rialto node * Make Millau's genesis config for Rialto bridge more accurate * Set initial header for Millau config * Update initial Millau authorities Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com> * RustFmt Millau authorities Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
9e9ac8df3c
commit
f52c839d6e
@@ -15,8 +15,8 @@
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use millau_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature,
|
||||
SudoConfig, SystemConfig, WASM_BINARY,
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeRialtoConfig, GenesisConfig, GrandpaConfig, SessionConfig,
|
||||
SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
};
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_core::{sr25519, Pair, Public};
|
||||
@@ -155,6 +155,7 @@ fn testnet_genesis(
|
||||
pallet_grandpa: Some(GrandpaConfig {
|
||||
authorities: Vec::new(),
|
||||
}),
|
||||
pallet_substrate_bridge: load_rialto_bridge_config(),
|
||||
pallet_sudo: Some(SudoConfig { key: root_key }),
|
||||
pallet_session: Some(SessionConfig {
|
||||
keys: initial_authorities
|
||||
@@ -164,3 +165,12 @@ fn testnet_genesis(
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
fn load_rialto_bridge_config() -> Option<BridgeRialtoConfig> {
|
||||
Some(BridgeRialtoConfig {
|
||||
initial_header: Some(millau_runtime::rialto::initial_header()),
|
||||
initial_authority_list: millau_runtime::rialto::initial_authority_set().authorities,
|
||||
initial_set_id: millau_runtime::rialto::initial_authority_set().set_id,
|
||||
first_scheduled_change: None,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user