mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 07:58:00 +00:00
Wait for relay chain block import before validatiing a block announcement (#227)
* Start with something * Whatever * Update * MOARE * Make cumulus-network compile and tests work * Update more and fixes * More stuff * More fixes * Make collator build * Make test almost work * Remove contracts runtime * More test work * Make service compile * Fix test-service * Fix test client * More fixes * Fix collator test * Fix network tests (again) * Make everything compile, finally * Fix tests * Write test that should fail * Add `WaitOnRelayChainBlock` * Update git versions * Make it all work * Update logging * Switch to provided method for pushing an extrinsic * Try to debug CI * Aaaa * Only use Debug * Updates * Use native execution to hopefully make CI happy...
This commit is contained in:
@@ -21,7 +21,7 @@ use cumulus_test_runtime::{AccountId, Signature};
|
||||
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
|
||||
use sc_service::ChainType;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sp_core::{sr25519, ChangesTrieConfiguration, Pair, Public};
|
||||
use sp_core::{sr25519, Pair, Public};
|
||||
use sp_runtime::traits::{IdentifyAccount, Verify};
|
||||
|
||||
/// Specialized `ChainSpec` for the normal parachain runtime.
|
||||
@@ -67,7 +67,7 @@ pub fn get_chain_spec(id: ParaId) -> ChainSpec {
|
||||
"Local Testnet",
|
||||
"local_testnet",
|
||||
ChainType::Local,
|
||||
move || local_testnet_genesis(None),
|
||||
move || local_testnet_genesis(),
|
||||
vec![],
|
||||
None,
|
||||
None,
|
||||
@@ -80,9 +80,7 @@ pub fn get_chain_spec(id: ParaId) -> ChainSpec {
|
||||
}
|
||||
|
||||
/// Local testnet genesis for testing.
|
||||
pub fn local_testnet_genesis(
|
||||
changes_trie_config: Option<ChangesTrieConfiguration>,
|
||||
) -> cumulus_test_runtime::GenesisConfig {
|
||||
pub fn local_testnet_genesis() -> cumulus_test_runtime::GenesisConfig {
|
||||
testnet_genesis(
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice"),
|
||||
vec![
|
||||
@@ -99,21 +97,19 @@ pub fn local_testnet_genesis(
|
||||
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
changes_trie_config,
|
||||
)
|
||||
}
|
||||
|
||||
fn testnet_genesis(
|
||||
root_key: AccountId,
|
||||
endowed_accounts: Vec<AccountId>,
|
||||
changes_trie_config: Option<ChangesTrieConfiguration>,
|
||||
) -> cumulus_test_runtime::GenesisConfig {
|
||||
cumulus_test_runtime::GenesisConfig {
|
||||
frame_system: Some(cumulus_test_runtime::SystemConfig {
|
||||
code: cumulus_test_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
changes_trie_config,
|
||||
..Default::default()
|
||||
}),
|
||||
pallet_balances: Some(cumulus_test_runtime::BalancesConfig {
|
||||
balances: endowed_accounts
|
||||
|
||||
@@ -22,6 +22,7 @@ mod chain_spec;
|
||||
mod genesis;
|
||||
|
||||
pub use chain_spec::*;
|
||||
pub use cumulus_test_runtime as runtime;
|
||||
pub use genesis::*;
|
||||
|
||||
use core::future::Future;
|
||||
@@ -164,6 +165,8 @@ where
|
||||
polkadot_full_node.client.clone(),
|
||||
para_id,
|
||||
Box::new(polkadot_full_node.network.clone()),
|
||||
polkadot_full_node.backend.clone(),
|
||||
polkadot_full_node.client.clone(),
|
||||
);
|
||||
let block_announce_validator_builder = move |_| Box::new(block_announce_validator) as Box<_>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user