From 3eedb5363f34dbd97544d3ad55da4240179dc2e1 Mon Sep 17 00:00:00 2001 From: salman01zp Date: Mon, 6 Nov 2023 17:30:49 +0530 Subject: [PATCH] update doc and rename function --- pallets/roles/src/impls.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/roles/src/impls.rs b/pallets/roles/src/impls.rs index 6267398b3..ef891b3d0 100644 --- a/pallets/roles/src/impls.rs +++ b/pallets/roles/src/impls.rs @@ -21,8 +21,9 @@ impl RolesHandler for Pallet { 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(()) } } @@ -36,7 +37,7 @@ impl Pallet { } /// 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 {