Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Oct 19, 2023
1 parent 176217e commit ebc8ef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 2 additions & 5 deletions Code/round/src/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub fn prevote(state: State, vr: Round, proposed: Value) -> Transition {
let value = match &state.locked {
Some(locked) if locked.round <= vr => Some(proposed), // unlock and prevote
Some(locked) if locked.value == proposed => Some(proposed), // already locked on value
Some(_) => None, // we're locked on a higher round with a different value, prevote nil
Some(_) => None, // we're locked on a higher round with a different value, prevote nil
None => Some(proposed), // not locked, prevote the value
};

Expand Down Expand Up @@ -145,10 +145,7 @@ pub fn prevote_nil(state: State) -> Transition {
/// How do we enforce this?
pub fn precommit(state: State, value: Value) -> Transition {
let message = Message::precommit(state.round, Some(value.clone()));
let next = state
.set_locked(value.clone())
.set_valid(value.clone())
.next_step();
let next = state.set_locked(value.clone()).set_valid(value.clone()).next_step();
Transition::to(next).with_message(message)
}

Expand Down
2 changes: 0 additions & 2 deletions Code/rustfmt.toml

This file was deleted.

0 comments on commit ebc8ef3

Please sign in to comment.