mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
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
This commit is contained in:
@@ -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,26 +256,21 @@ 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);
|
||||
Parachains::put(&only_ids);
|
||||
|
||||
for (id, code, genesis) in p {
|
||||
// no ingress -- a chain cannot be routed to until it is live.
|
||||
Code::insert(&id, &code);
|
||||
Heads::insert(&id, &genesis);
|
||||
<Watermarks<T>>::insert(&id, &sr_primitives::traits::Zero::zero());
|
||||
}
|
||||
});
|
||||
for (id, code, genesis) in p {
|
||||
// no ingress -- a chain cannot be routed to until it is live.
|
||||
Code::insert(&id, &code);
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user