mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 11:19:57 +00:00
function to trigger nullification period, tests for the new functionality and expansion of NetworkData trait
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
@@ -697,4 +697,13 @@ impl<T: Config> NetworkDataMutateHandler<NetworkData, BalanceOf<T>> for Pallet<T
|
||||
fn nullify_commission() {
|
||||
AccumulatedCommission::<T>::set(Default::default());
|
||||
}
|
||||
|
||||
fn trigger_nullification() {
|
||||
if NullifyNeeded::<T>::get() {
|
||||
Self::nullify_commission();
|
||||
NullifyNeeded::<T>::put(false);
|
||||
} else {
|
||||
NullifyNeeded::<T>::put(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user