commission as percent (#7239)

* commission_as_percent

* fixup
This commit is contained in:
Rob Walker
2019-12-03 20:55:04 -08:00
committed by GitHub
parent 369f37a0a4
commit ae93d574c2
8 changed files with 21 additions and 25 deletions

View File

@@ -47,7 +47,7 @@ impl VoteSubCommands for App<'_, '_> {
.long("commission")
.value_name("NUM")
.takes_value(true)
.help("The commission taken on reward redemption (0-255), default: 0"),
.help("The commission taken on reward redemption (0-100), default: 0"),
)
.arg(
Arg::with_name("authorized_voter")
@@ -345,10 +345,7 @@ pub fn process_show_vote_account(
vote_state.authorized_withdrawer
);
println!("credits: {}", vote_state.credits());
println!(
"commission: {}%",
f64::from(vote_state.commission) / f64::from(std::u32::MAX)
);
println!("commission: {}%", vote_state.commission);
println!(
"root slot: {}",
match vote_state.root_slot {