mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
Allow Substrate Pallet to be Initialized via Dipatchable (#481)
* Add dispatchable for intializing pallet * Add Polkadot JS types for Substrate bridge pallet * Ensure Root is the only one that can initialize the pallet * Add some tests * Pack initialization data into struct * Only allow pallet to be initialized once * Use new initialization config in nodes * Rename ScheduledChange in Ethereum pallet We're renaming it to prevent clashes with Substrate bridge pallet type of the same name. This is relevant when importing types to Polkadot JS Apps. * Move all Polkadot JS types into one file * Appease Clippy
This commit is contained in:
committed by
Bastian Köcher
parent
d4fc7bebdc
commit
cac8319480
@@ -16,7 +16,7 @@
|
||||
|
||||
use crate::error::Error;
|
||||
use crate::validators::{Validators, ValidatorsConfiguration};
|
||||
use crate::{AuraConfiguration, ChainTime, ImportContext, PoolConfiguration, ScheduledChange, Storage};
|
||||
use crate::{AuraConfiguration, AuraScheduledChange, ChainTime, ImportContext, PoolConfiguration, Storage};
|
||||
use bp_eth_poa::{
|
||||
public_to_address, step_validator, Address, AuraHeader, HeaderId, Receipt, SealedEmptyStep, H256, H520, U128, U256,
|
||||
};
|
||||
@@ -341,7 +341,7 @@ fn find_next_validators_signal<S: Storage>(storage: &S, context: &ImportContext<
|
||||
// if parent schedules validators set change, then it may be our set
|
||||
// else we'll start with last known change
|
||||
let mut current_set_signal_block = context.last_signal_block();
|
||||
let mut next_scheduled_set: Option<ScheduledChange> = None;
|
||||
let mut next_scheduled_set: Option<AuraScheduledChange> = None;
|
||||
|
||||
loop {
|
||||
// if we have reached block that signals finalized change, then
|
||||
@@ -456,7 +456,7 @@ mod tests {
|
||||
});
|
||||
ScheduledChanges::<DefaultInstance>::insert(
|
||||
header.header.parent_hash,
|
||||
ScheduledChange {
|
||||
AuraScheduledChange {
|
||||
validators: signalled_set,
|
||||
prev_signal_block: None,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user