Skip to content
Snippets Groups Projects
Unverified Commit d348cb01 authored by Kian Paimani's avatar Kian Paimani Committed by GitHub
Browse files

Update substrate/primitives/staking/src/lib.rs


Co-authored-by: default avatarAnkan <10196091+Ank4n@users.noreply.github.com>
parent e9180f65
No related merge requests found
Pipeline #512289 waiting for manual action with stages
in 3 minutes and 57 seconds
......@@ -522,7 +522,10 @@ where
) -> Self {
let new_nominator_count = self.nominator_count.saturating_add(others_num);
let new_page_count =
new_nominator_count.saturating_add(Max::get()).saturating_div(Max::get());
new_nominator_count
.defensive_saturating_add(Max::get())
.defensive_saturating_sub(1)
.saturating_div(Max::get());
Self {
total: self.total.saturating_add(others_balance),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment