From b7f015dfd1a7478f962d39444b27a3d10d45d332 Mon Sep 17 00:00:00 2001 From: mohab metwally Date: Sun, 27 Nov 2022 13:50:04 +0200 Subject: [PATCH] [consensus] fix total_stake_plus name --- src/consensus/state.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/consensus/state.rs b/src/consensus/state.rs index 5fbd385b1..00740545d 100644 --- a/src/consensus/state.rs +++ b/src/consensus/state.rs @@ -431,7 +431,7 @@ impl ValidatorState { let f = self.win_prob_with_full_stake(); // Generate sigmas - let mut total_stake = self.total_stake_plus(); // Only used for fine-tuning + let mut total_stake = self.total_stake(); // Only used for fine-tuning // at genesis epoch first slot, of absolute index 0, // the total stake would be 0, to avoid division by zero, // we asume total stake at first division is GENESIS_TOTAL_STAKE. @@ -549,9 +549,9 @@ impl ValidatorState { current_slot - blocks - self.get_current_offset() } - /// total stake plus one. + /// total stake /// assuming constant Reward. - fn total_stake_plus(&mut self) -> i64 { + fn total_stake(&mut self) -> i64 { let current_slot = self.current_slot(); ((current_slot - self.overall_empty_slots(current_slot)) * Self::reward()) as i64 }