Unverified Commit ff9947da authored by thiolliere's avatar thiolliere Committed by GitHub
Browse files

Update substrate master (#411)

* in progress impl

* im_online authorityid

* fix

* fix

* use polkadot-master

* trigger CI

* trigger CI

* fix removal

* storage reorganize included

* lock version
parent 03cfa5e9
Pipeline #50730 passed with stages
in 44 minutes and 4 seconds
This diff is collapsed.
......@@ -22,6 +22,5 @@ use substrate_executor::native_executor_instance;
native_executor_instance!(
pub Executor,
polkadot_runtime::api::dispatch,
polkadot_runtime::native_version,
polkadot_runtime::WASM_BINARY
polkadot_runtime::native_version
);
......@@ -115,7 +115,6 @@ decl_storage! {
}
add_extra_genesis {
config(claims): Vec<(EthereumAddress, BalanceOf<T>)>;
}
}
......@@ -125,7 +124,7 @@ decl_module! {
const Prefix: &[u8] = T::Prefix::get();
/// Deposit one of this module's events by using the default implementation.
fn deposit_event<T>() = default;
fn deposit_event() = default;
/// Make a claim.
#[weight = SimpleDispatchInfo::FixedNormal(1_000_000)]
......
......@@ -54,7 +54,7 @@ use sr_staking_primitives::SessionIndex;
use srml_support::{
parameter_types, construct_runtime, traits::{SplitTwoWays, Currency}
};
use im_online::AuthorityId as ImOnlineId;
use im_online::sr25519::{AuthorityId as ImOnlineId};
#[cfg(feature = "std")]
pub use staking::StakerStatus;
......@@ -414,6 +414,7 @@ impl offences::Trait for Runtime {
}
impl im_online::Trait for Runtime {
type AuthorityId = ImOnlineId;
type Call = Call;
type Event = Event;
type UncheckedExtrinsic = UncheckedExtrinsic;
......@@ -506,7 +507,7 @@ construct_runtime!(
Session: session::{Module, Call, Storage, Event, Config<T>},
FinalityTracker: finality_tracker::{Module, Call, Inherent},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
ImOnline: im_online::{Module, Call, Storage, Event, ValidateUnsigned, Config},
ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
// Governance stuff; uncallable initially.
Democracy: democracy::{Module, Call, Storage, Config, Event<T>},
......
......@@ -31,7 +31,7 @@ use primitives::{Hash, Balance, parachain::{
}};
use {system, session};
use srml_support::{
StorageValue, StorageMap, storage::AppendableStorageMap, Parameter, Dispatchable, dispatch::Result,
StorageValue, StorageMap, Parameter, Dispatchable, dispatch::Result,
traits::{Currency, Get, WithdrawReason, ExistenceRequirement}
};
......@@ -256,17 +256,13 @@ decl_storage! {
}
#[cfg(feature = "std")]
fn build<T: Trait>(
storage: &mut (StorageOverlay, ChildrenStorageOverlay),
config: &GenesisConfig<T>
) {
fn build<T: Trait>(config: &GenesisConfig<T>) {
let mut p = config.parachains.clone();
p.sort_unstable_by_key(|&(ref id, _, _)| *id);
p.dedup_by_key(|&mut (ref id, _, _)| *id);
let only_ids: Vec<ParaId> = p.iter().map(|&(ref id, _, _)| id).cloned().collect();
sr_io::with_storage(storage, || {
Parachains::put(&only_ids);
for (id, code, genesis) in p {
......@@ -275,7 +271,6 @@ fn build<T: Trait>(
Heads::insert(&id, &genesis);
<Watermarks<T>>::insert(&id, &sr_primitives::traits::Zero::zero());
}
});
}
decl_module! {
......
......@@ -203,7 +203,7 @@ decl_event!(
decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
fn deposit_event<T>() = default;
fn deposit_event() = default;
fn on_initialize(n: T::BlockNumber) {
let lease_period = T::LeasePeriod::get();
......
......@@ -29,7 +29,7 @@ use telemetry::TelemetryEndpoints;
use hex_literal::hex;
use babe_primitives::AuthorityId as BabeId;
use grandpa::AuthorityId as GrandpaId;
use im_online::AuthorityId as ImOnlineId;
use im_online::sr25519::{AuthorityId as ImOnlineId};
use srml_staking::Forcing;
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment