mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Update to latest Substrate master (#783)
* Update to latest Substrate master * Update wasm-builder and make `run` work
This commit is contained in:
Generated
+358
-415
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ mod browser;
|
||||
|
||||
use chain_spec::ChainSpec;
|
||||
use futures::{
|
||||
Future, FutureExt, TryFutureExt, future::select, channel::oneshot,
|
||||
Future, FutureExt, TryFutureExt, future::select, channel::oneshot, compat::Compat,
|
||||
};
|
||||
#[cfg(feature = "cli")]
|
||||
use tokio::runtime::Runtime;
|
||||
@@ -156,7 +156,7 @@ where
|
||||
|exit, _cli_args, custom_args, mut config| {
|
||||
info!("{}", version.name);
|
||||
info!(" version {}", config.full_version());
|
||||
info!(" by {}, 2017-2019", version.author);
|
||||
info!(" by {}, 2017-2020", version.author);
|
||||
info!("Chain specification: {}", config.chain_spec.name());
|
||||
info!("Native runtime: {}", D::native_version().runtime_version);
|
||||
if is_kusama {
|
||||
@@ -171,6 +171,10 @@ where
|
||||
config.custom = service::CustomConfiguration::default();
|
||||
config.custom.authority_discovery_enabled = custom_args.authority_discovery_enabled;
|
||||
let runtime = Runtime::new().map_err(|e| format!("{:?}", e))?;
|
||||
config.tasks_executor = {
|
||||
let runtime_handle = runtime.executor();
|
||||
Some(Box::new(move |fut| { runtime_handle.spawn(Compat::new(fut.map(Ok))); }))
|
||||
};
|
||||
match config.roles {
|
||||
service::Roles::LIGHT =>
|
||||
run_until_exit(
|
||||
|
||||
@@ -968,12 +968,11 @@ mod tests {
|
||||
}
|
||||
|
||||
impl session::Trait for Test {
|
||||
type OnSessionEnding = ();
|
||||
type SessionManager = ();
|
||||
type Keys = UintAuthorityId;
|
||||
type ShouldEndSession = session::PeriodicSessions<Period, Offset>;
|
||||
type SessionHandler = session::TestSessionHandler;
|
||||
type Event = ();
|
||||
type SelectInitialValidators = staking::Module<Self>;
|
||||
type ValidatorId = u64;
|
||||
type ValidatorIdOf = staking::StashOf<Self>;
|
||||
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
|
||||
|
||||
@@ -688,12 +688,11 @@ mod tests {
|
||||
}
|
||||
|
||||
impl session::Trait for Test {
|
||||
type OnSessionEnding = ();
|
||||
type SessionManager = ();
|
||||
type Keys = UintAuthorityId;
|
||||
type ShouldEndSession = session::PeriodicSessions<Period, Offset>;
|
||||
type SessionHandler = session::TestSessionHandler;
|
||||
type Event = ();
|
||||
type SelectInitialValidators = ();
|
||||
type ValidatorId = u64;
|
||||
type ValidatorIdOf = ();
|
||||
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
use wasm_builder_runner::{build_current_project, WasmBuilderSource};
|
||||
|
||||
fn main() {
|
||||
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.8"));
|
||||
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.9"));
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("kusama"),
|
||||
impl_name: create_runtime_str!("parity-kusama"),
|
||||
authoring_version: 2,
|
||||
spec_version: 1042,
|
||||
impl_version: 3,
|
||||
spec_version: 1043,
|
||||
impl_version: 0,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -241,14 +241,13 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl session::Trait for Runtime {
|
||||
type OnSessionEnding = Staking;
|
||||
type SessionManager = Staking;
|
||||
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
|
||||
type ShouldEndSession = Babe;
|
||||
type Event = Event;
|
||||
type Keys = SessionKeys;
|
||||
type ValidatorId = AccountId;
|
||||
type ValidatorIdOf = staking::StashOf<Self>;
|
||||
type SelectInitialValidators = Staking;
|
||||
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
use wasm_builder_runner::{build_current_project, WasmBuilderSource};
|
||||
|
||||
fn main() {
|
||||
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.8"));
|
||||
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.9"));
|
||||
}
|
||||
|
||||
@@ -245,14 +245,13 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl session::Trait for Runtime {
|
||||
type OnSessionEnding = Staking;
|
||||
type SessionManager = Staking;
|
||||
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
|
||||
type ShouldEndSession = Babe;
|
||||
type Event = Event;
|
||||
type Keys = SessionKeys;
|
||||
type ValidatorId = AccountId;
|
||||
type ValidatorIdOf = staking::StashOf<Self>;
|
||||
type SelectInitialValidators = Staking;
|
||||
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ pub mod chain_spec;
|
||||
use futures::{
|
||||
FutureExt, TryFutureExt,
|
||||
task::{Spawn, SpawnError, FutureObj},
|
||||
compat::{Future01CompatExt, Stream01CompatExt},
|
||||
compat::Future01CompatExt,
|
||||
};
|
||||
use sc_client::LongestChain;
|
||||
use std::sync::Arc;
|
||||
@@ -455,9 +455,9 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(config: Configuration)
|
||||
|
||||
if authority_discovery_enabled {
|
||||
let network = service.network();
|
||||
let network_event_stream = network.event_stream().compat();
|
||||
let network_event_stream = network.event_stream();
|
||||
let dht_event_stream = network_event_stream.filter_map(|e| async move { match e {
|
||||
Ok(Event::Dht(e)) => Some(e),
|
||||
Event::Dht(e) => Some(e),
|
||||
_ => None,
|
||||
}}).boxed();
|
||||
let authority_discovery = authority_discovery::AuthorityDiscovery::new(
|
||||
|
||||
@@ -19,7 +19,7 @@ use wasm_builder_runner::{build_current_project_with_rustflags, WasmBuilderSourc
|
||||
fn main() {
|
||||
build_current_project_with_rustflags(
|
||||
"wasm_binary.rs",
|
||||
WasmBuilderSource::Crates("1.0.7"),
|
||||
WasmBuilderSource::Crates("1.0.9"),
|
||||
"-C link-arg=--export=__heap_base",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ use wasm_builder_runner::{build_current_project_with_rustflags, WasmBuilderSourc
|
||||
fn main() {
|
||||
build_current_project_with_rustflags(
|
||||
"wasm_binary.rs",
|
||||
WasmBuilderSource::Crates("1.0.7"),
|
||||
WasmBuilderSource::Crates("1.0.9"),
|
||||
"-C link-arg=--export=__heap_base",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user