Skip to content

Commit

Permalink
init validator: default values for commission rate attributes (bug fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Oct 26, 2022
1 parent 7a7d82a commit 32722b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@ pub mod args {
use namada::types::token;
use namada::types::transaction::GasLimit;
use rust_decimal::Decimal;
use rust_decimal_macros::dec;

use super::context::{WalletAddress, WalletKeypair, WalletPublicKey};
use super::utils::*;
Expand Down Expand Up @@ -1327,7 +1328,8 @@ pub mod args {
const CHAIN_ID_PREFIX: Arg<ChainIdPrefix> = arg("chain-prefix");
const CODE_PATH: Arg<PathBuf> = arg("code-path");
const CODE_PATH_OPT: ArgOpt<PathBuf> = CODE_PATH.opt();
const COMMISSION_RATE: Arg<Decimal> = arg("commission-rate");
const COMMISSION_RATE: ArgDefault<Decimal> =
arg_default("commission-rate", DefaultFn(|| dec!(0.05)));
const CONSENSUS_TIMEOUT_COMMIT: ArgDefault<Timeout> = arg_default(
"consensus-timeout-commit",
DefaultFn(|| Timeout::from_str("1s").unwrap()),
Expand Down Expand Up @@ -1359,8 +1361,8 @@ pub mod args {

const LEDGER_ADDRESS: Arg<TendermintAddress> = arg("ledger-address");
const LOCALHOST: ArgFlag = flag("localhost");
const MAX_COMMISSION_RATE_CHANGE: Arg<Decimal> =
arg("max-commission-rate-change");
const MAX_COMMISSION_RATE_CHANGE: ArgDefault<Decimal> =
arg_default("max-commission-rate-change", DefaultFn(|| dec!(0.01)));
const MODE: ArgOpt<String> = arg_opt("mode");
const NET_ADDRESS: Arg<SocketAddr> = arg("net-address");
const NFT_ADDRESS: Arg<Address> = arg("nft-address");
Expand Down

0 comments on commit 32722b1

Please sign in to comment.