Skip to content

Commit

Permalink
Merge branch 'grarco/gas-fee-updates' (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Nov 7, 2023
2 parents 0ff2c12 + 07fe6c9 commit 6688ba1
Show file tree
Hide file tree
Showing 55 changed files with 1,998 additions and 514 deletions.
3 changes: 3 additions & 0 deletions .changelog/unreleased/improvements/2091-gas-fee-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Updated the gas costs. Introduced a local validator configuration
parameter to set the accepted tokens and amounts for fees.
([\#2091](https://github.com/anoma/namada/pull/2091))
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ clean:
$(cargo) clean

bench:
$(cargo) bench
$(cargo) bench --package namada_benchmarks

build-doc:
$(cargo) doc --no-deps
Expand Down
18 changes: 18 additions & 0 deletions apps/src/bin/namada-node/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use eyre::{Context, Result};
use namada::types::time::{DateTimeUtc, Utc};
use namada_apps::cli::{self, cmds};
use namada_apps::config::ValidatorLocalConfig;
use namada_apps::node::ledger;

pub fn main() -> Result<()> {
Expand Down Expand Up @@ -57,6 +58,23 @@ pub fn main() -> Result<()> {
);
}
}
cmds::Config::UpdateLocalConfig(cmds::LocalConfig(args)) => {
// Validate the new config
let updated_config = std::fs::read(args.config_path).unwrap();
let _validator_local_config: ValidatorLocalConfig =
toml::from_slice(&updated_config).unwrap();

// Update the validator configuration file with the new one
let config_path = ctx
.global_args
.base_dir
.join(format!(
"{}",
ctx.chain.unwrap().config.ledger.chain_id
))
.join("validator_local_config.toml");
std::fs::write(config_path, updated_config).unwrap();
}
},
}
Ok(())
Expand Down
Loading

0 comments on commit 6688ba1

Please sign in to comment.