Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared/tx/submit_validator_commission_change: print err even with force #1434

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions shared/src/ledger/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,11 @@ pub async fn submit_validator_commission_change<
let validator = args.validator.clone();
if rpc::is_validator(client, &validator).await {
if args.rate < Decimal::ZERO || args.rate > Decimal::ONE {
if args.tx.force {
eprintln!(
"Invalid new commission rate, received {}",
args.rate
);
Ok(())
} else {
Err(Error::InvalidCommisionRate(args.rate))
eprintln!("Invalid new commission rate, received {}", args.rate);
if !args.tx.force {
return Err(Error::InvalidCommisionRate(args.rate));
}
} else {
Ok(())
}?;
}

let pipeline_epoch_minus_one = epoch + params.pipeline_len - 1;

Expand Down