rustfmt slow-clap pallet
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
911db3b974
commit
c9b4325c04
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ghost-slow-clap"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
description = "Applause protocol for the EVM bridge"
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
|
||||
@ -609,8 +609,12 @@ impl<T: Config> Pallet<T> {
|
||||
let applause_threshold = Perbill::from_parts(T::ApplauseThreshold::get());
|
||||
let threshold_amount = applause_threshold.mul_floor(TotalExposure::<T>::get());
|
||||
|
||||
let maybe_account_id = T::ExposureListener::get_account_by_index(clap.authority_index as usize);
|
||||
ensure!(maybe_account_id.is_some(), Error::<T>::NonExistentAuthorityIndex);
|
||||
let maybe_account_id =
|
||||
T::ExposureListener::get_account_by_index(clap.authority_index as usize);
|
||||
ensure!(
|
||||
maybe_account_id.is_some(),
|
||||
Error::<T>::NonExistentAuthorityIndex
|
||||
);
|
||||
|
||||
let account_id = maybe_account_id.unwrap();
|
||||
let new_clapped_amount = T::ExposureListener::get_validator_exposure(&account_id);
|
||||
|
||||
@ -531,8 +531,8 @@ fn should_applause_and_take_next_claps() {
|
||||
assert_eq!(Balances::total_balance(&receiver), 0);
|
||||
for i in 0..=3 {
|
||||
assert_ok!(do_clap_from(session_index, network_id, i, false));
|
||||
let account_id = TestExposureListener::get_account_by_index(i as usize)
|
||||
.unwrap_or_default();
|
||||
let account_id =
|
||||
TestExposureListener::get_account_by_index(i as usize).unwrap_or_default();
|
||||
clapped_amount = TestExposureListener::get_validator_exposure(&account_id)
|
||||
.saturating_add(clapped_amount);
|
||||
assert_clapped_amount(&session_index, &unique_hash, clapped_amount);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user