Struct pallet_phron::pallet::Pallet
source · pub struct Pallet<T>(PhantomData<T>);
Expand description
The Pallet
struct, the main type that implements traits and standalone
functions within the pallet.
Tuple Fields§
§0: PhantomData<T>
Implementations§
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
pub(crate) fn update_emergency_finalizer()
pub(crate) fn set_next_emergency_finalizer(emergency_finalizer: T::AuthorityId)
pub(crate) fn current_session() -> u32
pub(crate) fn do_schedule_finality_version_change( version_change: VersionChange ) -> Result<(), &'static str>
pub fn next_session_finality_version() -> Version
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn set_emergency_finalizer(
origin: OriginFor<T>,
emergency_finalizer: T::AuthorityId
) -> DispatchResult
pub fn set_emergency_finalizer( origin: OriginFor<T>, emergency_finalizer: T::AuthorityId ) -> DispatchResult
Sets the emergency finalization key. If called in session N
the key can be used to
finalize blocks from session N+2
onwards, until it gets overridden.
sourcepub fn schedule_finality_version_change(
origin: OriginFor<T>,
version_incoming: Version,
session: SessionIndex
) -> DispatchResult
pub fn schedule_finality_version_change( origin: OriginFor<T>, version_incoming: Version, session: SessionIndex ) -> DispatchResult
Schedules a finality version change for a future session. If such a scheduled future version is already set, it is replaced with the provided one. Any rescheduling of a future version change needs to occur at least 2 sessions in advance of the provided session of the version change. In order to cancel a scheduled version change, a new version change should be scheduled with the same version as the current one.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn emergency_finalizer() -> Option<T::AuthorityId>
pub fn emergency_finalizer() -> Option<T::AuthorityId>
An auto-generated getter for EmergencyFinalizer
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn queued_emergency_finalizer() -> Option<T::AuthorityId>
pub fn queued_emergency_finalizer() -> Option<T::AuthorityId>
An auto-generated getter for QueuedEmergencyFinalizer
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn finality_version() -> Version
pub fn finality_version() -> Version
An auto-generated getter for FinalityVersion
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn finality_version_change() -> Option<VersionChange>
pub fn finality_version_change() -> Option<VersionChange>
An auto-generated getter for FinalityScheduledVersionChange
.
Trait Implementations§
source§impl<T: Config> BoundToRuntimeAppPublic for Pallet<T>
impl<T: Config> BoundToRuntimeAppPublic for Pallet<T>
§type Public = <T as Config>::AuthorityId
type Public = <T as Config>::AuthorityId
RuntimeAppPublic
] this type is bound to.source§impl<T: Config> FinalityCommitteeManager<<T as Config>::AccountId> for Pallet<T>
impl<T: Config> FinalityCommitteeManager<<T as Config>::AccountId> for Pallet<T>
source§fn on_next_session_finality_committee(committee: Vec<T::AccountId>)
fn on_next_session_finality_committee(committee: Vec<T::AccountId>)
committee
is the set elected for finality committee for the next sessionsource§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
§type CurrentStorageVersion = StorageVersion
type CurrentStorageVersion = StorageVersion
source§fn current_storage_version() -> Self::CurrentStorageVersion
fn current_storage_version() -> Self::CurrentStorageVersion
source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
source§impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§fn integrity_test()
fn integrity_test()
source§impl<T: Config> IntegrityTest for Pallet<T>
impl<T: Config> IntegrityTest for Pallet<T>
source§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].source§impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
source§impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
Hooks::on_finalize
].source§impl<T: Config> OnGenesis for Pallet<T>
impl<T: Config> OnGenesis for Pallet<T>
source§fn on_genesis()
fn on_genesis()
source§impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
Hooks::on_initialize
].source§impl<T: Config> OnRuntimeUpgrade for Pallet<T>
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].source§impl<T: Config> OneSessionHandler<<T as Config>::AccountId> for Pallet<T>
impl<T: Config> OneSessionHandler<<T as Config>::AccountId> for Pallet<T>
§type Key = <T as Config>::AuthorityId
type Key = <T as Config>::AuthorityId
source§fn on_genesis_session<'a, I>(validators: I)where
I: Iterator<Item = (&'a T::AccountId, T::AuthorityId)> + 'a,
T::AccountId: 'a,
fn on_genesis_session<'a, I>(validators: I)where
I: Iterator<Item = (&'a T::AccountId, T::AuthorityId)> + 'a,
T::AccountId: 'a,
on_new_session
should provide the same validator set.source§fn on_new_session<'a, I>(changed: bool, _: I, queued_validators: I)where
I: Iterator<Item = (&'a T::AccountId, T::AuthorityId)> + 'a,
T::AccountId: 'a,
fn on_new_session<'a, I>(changed: bool, _: I, queued_validators: I)where
I: Iterator<Item = (&'a T::AccountId, T::AuthorityId)> + 'a,
T::AccountId: 'a,
source§fn on_disabled(_validator_index: u32)
fn on_disabled(_validator_index: u32)
§fn on_before_session_ending()
fn on_before_session_ending()
source§impl<T: Config> PalletInfoAccess for Pallet<T>
impl<T: Config> PalletInfoAccess for Pallet<T>
source§fn module_name() -> &'static str
fn module_name() -> &'static str
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
source§impl<T> PartialEq for Pallet<T>
impl<T> PartialEq for Pallet<T>
source§impl<T> SessionManager<<T as Config>::AccountId> for Pallet<T>where
T: Config,
impl<T> SessionManager<<T as Config>::AccountId> for Pallet<T>where
T: Config,
source§fn new_session(new_index: SessionIndex) -> Option<Vec<T::AccountId>>
fn new_session(new_index: SessionIndex) -> Option<Vec<T::AccountId>>
source§fn new_session_genesis(new_index: SessionIndex) -> Option<Vec<T::AccountId>>
fn new_session_genesis(new_index: SessionIndex) -> Option<Vec<T::AccountId>>
new_session
, but it this should only be called at genesis. Read moresource§fn end_session(end_index: SessionIndex)
fn end_session(end_index: SessionIndex)
source§fn start_session(start_index: SessionIndex)
fn start_session(start_index: SessionIndex)
source§impl<T: Config> WhitelistedStorageKeys for Pallet<T>
impl<T: Config> WhitelistedStorageKeys for Pallet<T>
source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.impl<T> Eq for Pallet<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Pallet<T>where
T: RefUnwindSafe,
impl<T> Send for Pallet<T>where
T: Send,
impl<T> Sync for Pallet<T>where
T: Sync,
impl<T> Unpin for Pallet<T>where
T: Unpin,
impl<T> UnwindSafe for Pallet<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.