Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Feb 8, 2023
1 parent b0d1eb3 commit be60cac
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
4 changes: 2 additions & 2 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2261,8 +2261,8 @@ pub mod args {
.about(
"The list of proposed councils and spending \
caps:\n$council1 $cap1 $council2 $cap2 ... \
(council is bech32m encoded address, cap is expressed in \
microNAM",
(council is bech32m encoded address, cap is \
expressed in microNAM",
)
.requires(PROPOSAL_ID.name)
.conflicts_with(PROPOSAL_VOTE_ETH_OPT.name),
Expand Down
6 changes: 3 additions & 3 deletions apps/src/lib/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1809,9 +1809,9 @@ pub async fn query_bonded_stake(ctx: Context, args: args::QueryBondedStake) {
};
let is_active = validator_set.active.contains(&weighted);
if !is_active {
debug_assert!(validator_set
.inactive
.contains(&weighted));
debug_assert!(
validator_set.inactive.contains(&weighted)
);
}
println!(
"Validator {} is {}, bonded stake: {}",
Expand Down
37 changes: 23 additions & 14 deletions shared/src/ledger/native_vp/governance/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub fn compute_tally(
return Err(Error::Tally(format!(
"Unexpected proposal type: {}",
proposal_type
)))
)));
}
};

Expand Down Expand Up @@ -237,7 +237,14 @@ pub fn compute_tally(
{
*power -= vote_power;
} else {
return Err(Error::Tally(format!("Expected PGF vote {:?} was not in tally", vote)));
return Err(Error::Tally(
format!(
"Expected PGF \
vote {:?} was \
not in tally",
vote
),
));
}
} else {
// Validator didn't vote for
Expand All @@ -250,9 +257,10 @@ pub fn compute_tally(
} else {
// Log the error and continue
tracing::error!(
"Unexpected vote type. Expected: PGFCouncil, Found: {}",
validator_vote
);
"Unexpected vote type. Expected: \
PGFCouncil, Found: {}",
validator_vote
);
continue;
}
}
Expand Down Expand Up @@ -290,9 +298,8 @@ pub fn compute_tally(
} else {
return Err(Error::Tally(
format!(
"Expected PGF \
vote {:?} was \
not in tally",
"Expected PGF vote \
{:?} was not in tally",
vote
),
));
Expand All @@ -301,9 +308,10 @@ pub fn compute_tally(
} else {
// Log the error and continue
tracing::error!(
"Unexpected vote type. Expected: PGFCouncil, Found: {}",
validator_vote
);
"Unexpected vote type. Expected: \
PGFCouncil, Found: {}",
validator_vote
);
continue;
}
}
Expand All @@ -312,9 +320,10 @@ pub fn compute_tally(
_ => {
// Log the error and continue
tracing::error!(
"Unexpected vote type. Expected: PGFCouncil, Found: {}",
delegator_vote
);
"Unexpected vote type. Expected: PGFCouncil, \
Found: {}",
delegator_vote
);
continue;
}
}
Expand Down

0 comments on commit be60cac

Please sign in to comment.