mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
@@ -982,7 +982,10 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::event]
|
#[pallet::event]
|
||||||
#[pallet::metadata(<T as frame_system::Config>::AccountId = "AccountId")]
|
#[pallet::metadata(
|
||||||
|
<T as frame_system::Config>::AccountId = "AccountId",
|
||||||
|
BalanceOf<T> = "Balance"
|
||||||
|
)]
|
||||||
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
||||||
pub enum Event<T: Config> {
|
pub enum Event<T: Config> {
|
||||||
/// A solution was stored with the given compute.
|
/// A solution was stored with the given compute.
|
||||||
@@ -996,9 +999,9 @@ pub mod pallet {
|
|||||||
/// election failed, `None`.
|
/// election failed, `None`.
|
||||||
ElectionFinalized(Option<ElectionCompute>),
|
ElectionFinalized(Option<ElectionCompute>),
|
||||||
/// An account has been rewarded for their signed submission being finalized.
|
/// An account has been rewarded for their signed submission being finalized.
|
||||||
Rewarded(<T as frame_system::Config>::AccountId),
|
Rewarded(<T as frame_system::Config>::AccountId, BalanceOf<T>),
|
||||||
/// An account has been slashed for submitting an invalid signed submission.
|
/// An account has been slashed for submitting an invalid signed submission.
|
||||||
Slashed(<T as frame_system::Config>::AccountId),
|
Slashed(<T as frame_system::Config>::AccountId, BalanceOf<T>),
|
||||||
/// The signed phase of the given round has started.
|
/// The signed phase of the given round has started.
|
||||||
SignedPhaseStarted(u32),
|
SignedPhaseStarted(u32),
|
||||||
/// The unsigned phase of the given round has started.
|
/// The unsigned phase of the given round has started.
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ impl<T: Config> Pallet<T> {
|
|||||||
<QueuedSolution<T>>::put(ready_solution);
|
<QueuedSolution<T>>::put(ready_solution);
|
||||||
|
|
||||||
// emit reward event
|
// emit reward event
|
||||||
Self::deposit_event(crate::Event::Rewarded(who.clone()));
|
Self::deposit_event(crate::Event::Rewarded(who.clone(), reward));
|
||||||
|
|
||||||
// unreserve deposit.
|
// unreserve deposit.
|
||||||
let _remaining = T::Currency::unreserve(who, deposit);
|
let _remaining = T::Currency::unreserve(who, deposit);
|
||||||
@@ -434,7 +434,7 @@ impl<T: Config> Pallet<T> {
|
|||||||
///
|
///
|
||||||
/// Infallible
|
/// Infallible
|
||||||
pub fn finalize_signed_phase_reject_solution(who: &T::AccountId, deposit: BalanceOf<T>) {
|
pub fn finalize_signed_phase_reject_solution(who: &T::AccountId, deposit: BalanceOf<T>) {
|
||||||
Self::deposit_event(crate::Event::Slashed(who.clone()));
|
Self::deposit_event(crate::Event::Slashed(who.clone(), deposit));
|
||||||
let (negative_imbalance, _remaining) = T::Currency::slash_reserved(who, deposit);
|
let (negative_imbalance, _remaining) = T::Currency::slash_reserved(who, deposit);
|
||||||
debug_assert!(_remaining.is_zero());
|
debug_assert!(_remaining.is_zero());
|
||||||
T::SlashHandler::on_unbalanced(negative_imbalance);
|
T::SlashHandler::on_unbalanced(negative_imbalance);
|
||||||
|
|||||||
Reference in New Issue
Block a user