Function hotshot_task_impls::harness::check_event

source ·
fn check_event<TYPES: NodeType>(
    event: Arc<HotShotEvent<TYPES>>,
    state: &mut TestHarnessState<TYPES>,
) -> Option<HotShotTaskCompleted>
Expand description

Handles an event for the Test Harness Task. If the event is expected, remove it from the expected_output in state. If unexpected fail test.

§Arguments

  • allow_extra_output - whether to allow an extra output after we’ve seen all expected outputs. Should be false in most cases.

§Panics

Will panic to fail the test when it receives and unexpected event