Skip to content

Commit

Permalink
update doc and rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
salman01zp committed Nov 6, 2023
1 parent 8abd12f commit 3eedb53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pallets/roles/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ impl<T: Config> RolesHandler<T::AccountId> for Pallet<T> {
address: T::AccountId,
_offence: tangle_primitives::jobs::ValidatorOffence,
) -> sp_runtime::DispatchResult {
// TODO: implement calculation of slash amount.
let slash_amount = 1000u64;
Self::slash(address, slash_amount.into())?;
Self::do_slash(address, slash_amount.into())?;
Ok(())
}
}
Expand All @@ -36,7 +37,7 @@ impl<T: Config> Pallet<T> {
}

/// Slash staker's balance by the given amount.
pub(crate) fn slash(
pub(crate) fn do_slash(
address: T::AccountId,
slash_amount: T::CurrencyBalance,
) -> sp_runtime::DispatchResult {
Expand Down

0 comments on commit 3eedb53

Please sign in to comment.