Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Oct 24, 2023
1 parent 27a35fb commit d049fba
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Code/test/src/consensus_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,18 @@ fn test_executor_steps() {
];

let mut previous_message = None;

for step in steps {
let execute_message = if step.input_message.is_none() {
previous_message.clone()
} else {
step.input_message
}
.unwrap();
let execute_message = step
.input_message
.unwrap_or_else(|| previous_message.unwrap());

let message = executor.execute(execute_message);
assert_eq!(message, step.expected_output_message);

let new_state = executor.round_state(Round::new(0)).unwrap();
assert_eq!(new_state, &step.new_state);

previous_message = message;
}
}

0 comments on commit d049fba

Please sign in to comment.