Update to almost latest substrate master (#205)

This commit is contained in:
Bastian Köcher
2019-04-03 17:46:04 +02:00
committed by GitHub
parent 9a74006686
commit b13b7aec7c
8 changed files with 1479 additions and 1415 deletions
+860 -828
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -178,7 +178,7 @@ impl ProvideRuntimeApi for TestApi {
} }
impl Core<Block> for RuntimeApi { impl Core<Block> for RuntimeApi {
fn version_runtime_api_impl( fn Core_version_runtime_api_impl(
&self, &self,
_: &BlockId, _: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -188,7 +188,7 @@ impl Core<Block> for RuntimeApi {
unimplemented!("Not required for testing!") unimplemented!("Not required for testing!")
} }
fn authorities_runtime_api_impl( fn Core_authorities_runtime_api_impl(
&self, &self,
_: &BlockId, _: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -198,7 +198,7 @@ impl Core<Block> for RuntimeApi {
unimplemented!("Not required for testing!") unimplemented!("Not required for testing!")
} }
fn execute_block_runtime_api_impl( fn Core_execute_block_runtime_api_impl(
&self, &self,
_: &BlockId, _: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -208,7 +208,7 @@ impl Core<Block> for RuntimeApi {
unimplemented!("Not required for testing!") unimplemented!("Not required for testing!")
} }
fn initialize_block_runtime_api_impl( fn Core_initialize_block_runtime_api_impl(
&self, &self,
_: &BlockId, _: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -233,7 +233,7 @@ impl ApiExt<Block> for RuntimeApi {
} }
impl ParachainHost<Block> for RuntimeApi { impl ParachainHost<Block> for RuntimeApi {
fn validators_runtime_api_impl( fn ParachainHost_validators_runtime_api_impl(
&self, &self,
_at: &BlockId, _at: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -243,7 +243,7 @@ impl ParachainHost<Block> for RuntimeApi {
Ok(NativeOrEncoded::Native(self.data.lock().validators.clone())) Ok(NativeOrEncoded::Native(self.data.lock().validators.clone()))
} }
fn duty_roster_runtime_api_impl( fn ParachainHost_duty_roster_runtime_api_impl(
&self, &self,
_at: &BlockId, _at: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -256,7 +256,7 @@ impl ParachainHost<Block> for RuntimeApi {
})) }))
} }
fn active_parachains_runtime_api_impl( fn ParachainHost_active_parachains_runtime_api_impl(
&self, &self,
_at: &BlockId, _at: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -266,7 +266,7 @@ impl ParachainHost<Block> for RuntimeApi {
Ok(NativeOrEncoded::Native(self.data.lock().active_parachains.clone())) Ok(NativeOrEncoded::Native(self.data.lock().active_parachains.clone()))
} }
fn parachain_head_runtime_api_impl( fn ParachainHost_parachain_head_runtime_api_impl(
&self, &self,
_at: &BlockId, _at: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -276,7 +276,7 @@ impl ParachainHost<Block> for RuntimeApi {
Ok(NativeOrEncoded::Native(Some(Vec::new()))) Ok(NativeOrEncoded::Native(Some(Vec::new())))
} }
fn parachain_code_runtime_api_impl( fn ParachainHost_parachain_code_runtime_api_impl(
&self, &self,
_at: &BlockId, _at: &BlockId,
_: ExecutionContext, _: ExecutionContext,
@@ -286,7 +286,7 @@ impl ParachainHost<Block> for RuntimeApi {
Ok(NativeOrEncoded::Native(Some(Vec::new()))) Ok(NativeOrEncoded::Native(Some(Vec::new())))
} }
fn ingress_runtime_api_impl( fn ParachainHost_ingress_runtime_api_impl(
&self, &self,
_at: &BlockId, _at: &BlockId,
_: ExecutionContext, _: ExecutionContext,
+3 -1
View File
@@ -38,6 +38,7 @@ srml-system = { git = "https://github.com/paritytech/substrate", default-feature
srml-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" } srml-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
srml-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" } srml-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" } sr-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-consensus-authorities = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
[dev-dependencies] [dev-dependencies]
hex-literal = "0.1.0" hex-literal = "0.1.0"
@@ -81,5 +82,6 @@ std = [
"serde_derive", "serde_derive",
"serde/std", "serde/std",
"log", "log",
"safe-mix/std" "safe-mix/std",
"substrate-consensus-authorities/std"
] ]
+12 -1
View File
@@ -63,6 +63,7 @@ extern crate srml_sudo as sudo;
extern crate srml_system as system; extern crate srml_system as system;
extern crate srml_timestamp as timestamp; extern crate srml_timestamp as timestamp;
extern crate srml_treasury as treasury; extern crate srml_treasury as treasury;
extern crate substrate_consensus_authorities as consensus_authorities;
extern crate polkadot_primitives as primitives; extern crate polkadot_primitives as primitives;
@@ -88,7 +89,9 @@ use client::{
}; };
use sr_primitives::{ use sr_primitives::{
ApplyResult, generic, transaction_validity::TransactionValidity, ApplyResult, generic, transaction_validity::TransactionValidity,
traits::{BlakeTwo256, Block as BlockT, DigestFor, StaticLookup} traits::{
BlakeTwo256, Block as BlockT, DigestFor, StaticLookup, CurrencyToVoteHandler, AuthorityIdFor
}
}; };
use version::RuntimeVersion; use version::RuntimeVersion;
use grandpa::fg_primitives::{self, ScheduledChange}; use grandpa::fg_primitives::{self, ScheduledChange};
@@ -187,6 +190,7 @@ impl session::Trait for Runtime {
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
type OnRewardMinted = Treasury; type OnRewardMinted = Treasury;
type CurrencyToVote = CurrencyToVoteHandler;
type Event = Event; type Event = Event;
type Currency = balances::Module<Self>; type Currency = balances::Module<Self>;
type Slash = (); type Slash = ();
@@ -395,4 +399,11 @@ impl_runtime_apis! {
Aura::slot_duration() Aura::slot_duration()
} }
} }
impl consensus_authorities::AuthoritiesApi<Block> for Runtime {
fn authorities() -> Vec<AuthorityIdFor<Block>> {
Consensus::authorities()
}
}
} }
+594 -573
View File
File diff suppressed because it is too large Load Diff
-2
View File
@@ -304,7 +304,6 @@ construct_service_factory! {
client, client,
NothingExtra, NothingExtra,
config.custom.inherent_data_providers.clone(), config.custom.inherent_data_providers.clone(),
true,
).map_err(Into::into) ).map_err(Into::into)
}}, }},
LightImportQueue = AuraImportQueue< LightImportQueue = AuraImportQueue<
@@ -320,7 +319,6 @@ construct_service_factory! {
client, client,
NothingExtra, NothingExtra,
config.custom.inherent_data_providers.clone(), config.custom.inherent_data_providers.clone(),
true,
).map_err(Into::into) ).map_err(Into::into)
}}, }},
} }