Skip to content

Commit

Permalink
refactor(governance): update StateWriteExt::signal_upgrade comment (#…
Browse files Browse the repository at this point in the history
…4789)

## Describe your changes

`StateWriteExt::signal_upgrade` is infallible and doesn't await on
anything, so its function signature can be simplified to not be async
and not return a `Result<()>` that's always `Ok(())`.

Also fixes a comment referring to `TOTAL_HALT_COUNT`, which is now a
boolean and not a count.

## Checklist before requesting a review

- [X] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > No change to behavior

Signed-off-by: syvb <[email protected]>
  • Loading branch information
syvb authored Aug 6, 2024
1 parent 027df2a commit dd369ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/component/governance/src/component/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ pub trait StateWriteExt: StateWrite + penumbra_ibc::component::ConnectionStateWr
/// Records the next upgrade height.
/// After commititng the height, the chain should halt and wait for an upgrade.
/// It re-uses the same mechanism as emergency halting that prevents the chain from
/// restarting without incrementing the application `TOTAL_HALT_COUNT`.
/// restarting, without setting `halt_bit`.
async fn signal_upgrade(&mut self, height: u64) -> Result<()> {
self.nonverifiable_put_raw(
state_key::upgrades::next_upgrade().into(),
Expand Down

0 comments on commit dd369ae

Please sign in to comment.