use of tech.pegasys.teku.api.response.v1.HeadEvent in project teku by ConsenSys.
the class EventSourceHandlerTest method onMessage_shouldHandleInvalidMessage.
@Test
void onMessage_shouldHandleInvalidMessage() throws Exception {
final UInt64 slot = UInt64.valueOf(134);
final HeadEvent event = new HeadEvent(slot, dataStructureUtil.randomBytes32(), dataStructureUtil.randomBytes32(), false, false, dataStructureUtil.randomBytes32(), dataStructureUtil.randomBytes32());
// Head message with a reorg type
final MessageEvent messageEvent = new MessageEvent(jsonProvider.objectToJSON(event));
assertDoesNotThrow(() -> handler.onMessage(EventType.chain_reorg.name(), messageEvent));
verifyNoInteractions(validatorTimingChannel);
}
Aggregations