Skip to content

Commit

Permalink
Merge pull request #3689 from anoma/grarco/misc-gov-fixes
Browse files Browse the repository at this point in the history
Minor fixes to governance cli/msgs
  • Loading branch information
mergify[bot] committed Aug 23, 2024
2 parents c61f09e + ff6b06f commit 15ac38c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/3689-misc-gov-fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Improved some governance messages and cli commands arguments.
([\#3689](https://github.com/anoma/namada/pull/3689))
26 changes: 3 additions & 23 deletions crates/apps_lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3379,7 +3379,6 @@ pub mod args {
DefaultFn(|| PortId::from_str("transfer").unwrap()),
);
pub const PRE_GENESIS: ArgFlag = flag("pre-genesis");
pub const PROPOSAL_ETH: ArgFlag = flag("eth");
pub const PROPOSAL_PGF_STEWARD: ArgFlag = flag("pgf-stewards");
pub const PROPOSAL_PGF_FUNDING: ArgFlag = flag("pgf-funding");
pub const PROTOCOL_KEY: ArgOpt<WalletPublicKey> = arg_opt("protocol-key");
Expand Down Expand Up @@ -5609,26 +5608,14 @@ pub mod args {
.arg(DATA_PATH.def().help(wrap!(
"The data path file (json) that describes the proposal."
)))
.arg(
PROPOSAL_ETH
.def()
.help(wrap!("Flag if the proposal is of type eth."))
.conflicts_with_all([
PROPOSAL_PGF_FUNDING.name,
PROPOSAL_PGF_STEWARD.name,
]),
)
.arg(
PROPOSAL_PGF_STEWARD
.def()
.help(wrap!(
"Flag if the proposal is of type pgf-stewards. \
Used to elect/remove stewards."
))
.conflicts_with_all([
PROPOSAL_ETH.name,
PROPOSAL_PGF_FUNDING.name,
]),
.conflicts_with(PROPOSAL_PGF_FUNDING.name),
)
.arg(
PROPOSAL_PGF_FUNDING
Expand All @@ -5637,10 +5624,7 @@ pub mod args {
"Flag if the proposal is of type pgf-funding. \
Used to control continuous/retro PGF fundings."
))
.conflicts_with_all([
PROPOSAL_ETH.name,
PROPOSAL_PGF_STEWARD.name,
]),
.conflicts_with(PROPOSAL_PGF_STEWARD.name),
)
}
}
Expand Down Expand Up @@ -5685,11 +5669,7 @@ pub mod args {

fn def(app: App) -> App {
app.add_args::<Tx<CliTypes>>()
.arg(
PROPOSAL_ID_OPT
.def()
.help(wrap!("The proposal identifier.")),
)
.arg(PROPOSAL_ID.def().help(wrap!("The proposal identifier.")))
.arg(PROPOSAL_VOTE.def().help(wrap!(
"The vote for the proposal. Either yay, nay, or abstain."
)))
Expand Down
3 changes: 2 additions & 1 deletion crates/governance/src/vp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ where

if !is_delegator {
return Err(native_vp::Error::new_alloc(format!(
"Address {voter} is neither a validator nor a delegator."
"Address {voter} is neither a validator nor a delegator at \
the beginning of epoch {pre_voting_start_epoch}."
))
.into());
}
Expand Down
3 changes: 2 additions & 1 deletion wasm/vp_implicit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ fn validate_tx(
verifiers: BTreeSet<Address>,
) -> VpResult {
debug_log!(
"vp_user called with user addr: {}, key_changed: {:?}, verifiers: {:?}",
"vp_implicit called with user addr: {}, key_changed: {:?}, verifiers: \
{:?}",
addr,
keys_changed,
verifiers
Expand Down

0 comments on commit 15ac38c

Please sign in to comment.