Update Substrate & Polkadot (#563)

This commit is contained in:
Bastian Köcher
2021-08-05 20:53:32 +02:00
committed by GitHub
parent 5e86294e4e
commit 9a0cfd9117
9 changed files with 277 additions and 273 deletions
+262 -263
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -33,7 +33,7 @@ use sp_runtime::{
traits::{Block as BlockT, HashFor, Header as HeaderT}, traits::{Block as BlockT, HashFor, Header as HeaderT},
}; };
use polkadot_node_primitives::{SignedFullStatement, Statement}; use polkadot_node_primitives::{SignedFullStatement, Statement, CollationSecondedSignal};
use polkadot_parachain::primitives::HeadData; use polkadot_parachain::primitives::HeadData;
use polkadot_primitives::v1::{ use polkadot_primitives::v1::{
Block as PBlock, Hash as PHash, CandidateReceipt, CompactStatement, Id as ParaId, Block as PBlock, Hash as PHash, CandidateReceipt, CompactStatement, Id as ParaId,
@@ -530,7 +530,7 @@ impl<Block: BlockT> WaitToAnnounce<Block> {
pub fn wait_to_announce( pub fn wait_to_announce(
&mut self, &mut self,
block_hash: <Block as BlockT>::Hash, block_hash: <Block as BlockT>::Hash,
signed_stmt_recv: oneshot::Receiver<SignedFullStatement>, signed_stmt_recv: oneshot::Receiver<CollationSecondedSignal>,
) { ) {
let announce_block = self.announce_block.clone(); let announce_block = self.announce_block.clone();
@@ -557,10 +557,10 @@ impl<Block: BlockT> WaitToAnnounce<Block> {
async fn wait_to_announce<Block: BlockT>( async fn wait_to_announce<Block: BlockT>(
block_hash: <Block as BlockT>::Hash, block_hash: <Block as BlockT>::Hash,
announce_block: Arc<dyn Fn(Block::Hash, Option<Vec<u8>>) + Send + Sync>, announce_block: Arc<dyn Fn(Block::Hash, Option<Vec<u8>>) + Send + Sync>,
signed_stmt_recv: oneshot::Receiver<SignedFullStatement>, signed_stmt_recv: oneshot::Receiver<CollationSecondedSignal>,
) { ) {
let statement = match signed_stmt_recv.await { let statement = match signed_stmt_recv.await {
Ok(s) => s, Ok(s) => s.statement,
Err(_) => { Err(_) => {
tracing::debug!( tracing::debug!(
target: "cumulus-network", target: "cumulus-network",
@@ -126,6 +126,7 @@ impl pallet_timestamp::Config for Test {
impl pallet_aura::Config for Test { impl pallet_aura::Config for Test {
type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; type AuthorityId = sp_consensus_aura::sr25519::AuthorityId;
type DisabledValidators = ();
} }
sp_runtime::impl_opaque_keys! { sp_runtime::impl_opaque_keys! {
@@ -427,6 +427,7 @@ impl pallet_assets::Config for Runtime {
impl pallet_aura::Config for Runtime { impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId; type AuthorityId = AuraId;
type DisabledValidators = ();
} }
construct_runtime! { construct_runtime! {
+4 -4
View File
@@ -223,7 +223,7 @@ where
Executor: sc_executor::NativeExecutionDispatch + 'static, Executor: sc_executor::NativeExecutionDispatch + 'static,
RB: Fn( RB: Fn(
Arc<TFullClient<Block, RuntimeApi, Executor>>, Arc<TFullClient<Block, RuntimeApi, Executor>>,
) -> jsonrpc_core::IoHandler<sc_rpc::Metadata> ) -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, sc_service::Error>
+ Send + Send
+ 'static, + 'static,
BIQ: FnOnce( BIQ: FnOnce(
@@ -418,7 +418,7 @@ pub async fn start_rococo_parachain_node(
parachain_config, parachain_config,
polkadot_config, polkadot_config,
id, id,
|_| Default::default(), |_| Ok(Default::default()),
rococo_parachain_build_import_queue, rococo_parachain_build_import_queue,
|client, |client,
prometheus_registry, prometheus_registry,
@@ -536,7 +536,7 @@ pub async fn start_shell_node(
parachain_config, parachain_config,
polkadot_config, polkadot_config,
id, id,
|_| Default::default(), |_| Ok(Default::default()),
shell_build_import_queue, shell_build_import_queue,
|client, |client,
prometheus_registry, prometheus_registry,
@@ -809,7 +809,7 @@ where
parachain_config, parachain_config,
polkadot_config, polkadot_config,
id, id,
|_| Default::default(), |_| Ok(Default::default()),
statemint_build_import_queue, statemint_build_import_queue,
|client, |client,
prometheus_registry, prometheus_registry,
@@ -624,6 +624,7 @@ impl pallet_session::Config for Runtime {
impl pallet_aura::Config for Runtime { impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId; type AuthorityId = AuraId;
type DisabledValidators = ();
} }
parameter_types! { parameter_types! {
@@ -592,6 +592,7 @@ impl pallet_session::Config for Runtime {
impl pallet_aura::Config for Runtime { impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId; type AuthorityId = AuraId;
type DisabledValidators = ();
} }
parameter_types! { parameter_types! {
@@ -590,6 +590,7 @@ impl pallet_session::Config for Runtime {
impl pallet_aura::Config for Runtime { impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId; type AuthorityId = AuraId;
type DisabledValidators = ();
} }
parameter_types! { parameter_types! {
+2 -2
View File
@@ -162,7 +162,7 @@ async fn start_node_impl<RB>(
where where
RB: Fn( RB: Fn(
Arc<TFullClient<Block, RuntimeApi, RuntimeExecutor>>, Arc<TFullClient<Block, RuntimeApi, RuntimeExecutor>>,
) -> jsonrpc_core::IoHandler<sc_rpc::Metadata> ) -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, sc_service::Error>
+ Send + Send
+ 'static, + 'static,
{ {
@@ -516,7 +516,7 @@ impl TestNodeBuilder {
relay_chain_config, relay_chain_config,
self.para_id, self.para_id,
self.wrap_announce_block, self.wrap_announce_block,
|_| Default::default(), |_| Ok(Default::default()),
self.consensus, self.consensus,
) )
.await .await