Correctly show reward percent changes (#14161)

(cherry picked from commit bebfa6e93c)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
mergify[bot]
2020-12-16 18:15:36 +00:00
committed by GitHub
parent c481e4fe7f
commit 0276b6c4c2
2 changed files with 7 additions and 6 deletions

View File

@@ -800,8 +800,9 @@ pub fn process_get_block(
format!(
"{:<19.9} {:>13.9}%",
lamports_to_sol(reward.post_balance),
reward.lamports.abs() as f64
/ (reward.post_balance as f64 - reward.lamports as f64)
(reward.lamports.abs() as f64
/ (reward.post_balance as f64 - reward.lamports as f64))
* 100.0
)
}
);