Skip to content

Commit

Permalink
Minor fixes to governance cli/msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Aug 22, 2024
1 parent daf77c6 commit dbac3ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
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 dbac3ad

Please sign in to comment.