Skip to content

Commit

Permalink
Validator: temporarily add artificial panic when micro block producti…
Browse files Browse the repository at this point in the history
…on fails

This should be removed once #2751 is fixed.
  • Loading branch information
styppo committed Aug 31, 2024
1 parent dc399ca commit 6c5b66a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions validator/src/micro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ impl<TValidatorNetwork: ValidatorNetwork + 'static> NextProduceMicroBlockEvent<T
}
}

// TODO Remove this line
#[allow(unreachable_code)]
async fn next(
self,
) -> (
Expand Down Expand Up @@ -132,6 +134,11 @@ impl<TValidatorNetwork: ValidatorNetwork + 'static> NextProduceMicroBlockEvent<T
"Failed to construct micro block"
);

// Add an artificial panic here so that it's easier to catch any remaining
// mempool bugs.
// TODO Remove this line and the #[allow(unreachable_code)] annotation on this function.
panic!("Failed to construct micro block");

// Sleep a bit to allow the task to be cancelled externally if needed.
delay = Duration::from_millis(50);
continue;
Expand Down

0 comments on commit 6c5b66a

Please sign in to comment.