mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Update to latest Substrate (#377)
* Update to latest substrate * Propagate substrate#3225 * Fixes * Build * Fix
This commit is contained in:
committed by
Bastian Köcher
parent
1054a531b5
commit
2c6409a942
@@ -128,7 +128,7 @@ impl SignedExtension for OnlyStakingAndClaims {
|
||||
-> Result<ValidTransaction, DispatchError>
|
||||
{
|
||||
match call {
|
||||
Call::Staking(_) | Call::Claims(_) => Ok(Default::default()),
|
||||
Call::Staking(_) | Call::Claims(_) | Call::Sudo(_) => Ok(Default::default()),
|
||||
_ => Err(DispatchError::NoPermission),
|
||||
}
|
||||
}
|
||||
@@ -491,7 +491,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<T>},
|
||||
ImOnline: im_online::{Module, Call, Storage, Event, ValidateUnsigned, Config},
|
||||
|
||||
// Governance stuff; uncallable initially.
|
||||
Democracy: democracy::{Module, Call, Storage, Config, Event<T>},
|
||||
@@ -658,6 +658,7 @@ impl_runtime_apis! {
|
||||
epoch_index: Babe::epoch_index(),
|
||||
randomness: Babe::randomness(),
|
||||
duration: EpochDuration::get(),
|
||||
secondary_slots: Babe::secondary_slots().0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -839,11 +839,17 @@ impl<T: Trait> Module<T> {
|
||||
impl<T: Trait> session::OneSessionHandler<T::AccountId> for Module<T> {
|
||||
type Key = ValidatorId;
|
||||
|
||||
fn on_genesis_session<'a, I: 'a>(validators: I)
|
||||
where I: Iterator<Item=(&'a T::AccountId, Self::Key)>
|
||||
{
|
||||
<Self as Store>::Authorities::put(&validators.map(|(_, key)| key).collect::<Vec<_>>())
|
||||
}
|
||||
|
||||
fn on_new_session<'a, I: 'a>(changed: bool, validators: I, _queued: I)
|
||||
where I: Iterator<Item=(&'a T::AccountId, Self::Key)>
|
||||
{
|
||||
if changed {
|
||||
<Self as Store>::Authorities::put(&validators.map(|(_, key)| key).collect::<Vec<_>>())
|
||||
Self::on_genesis_session(validators)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1080,7 +1086,7 @@ mod tests {
|
||||
|
||||
babe::GenesisConfig {
|
||||
authorities: babe_authorities,
|
||||
}.assimilate_storage(&mut t).unwrap();
|
||||
}.assimilate_storage::<Test>(&mut t).unwrap();
|
||||
|
||||
balances::GenesisConfig::<Test> {
|
||||
balances,
|
||||
|
||||
Reference in New Issue
Block a user