use of tech.pegasys.teku.ethereum.executionlayer.client.schema.ExecutionPayloadV1 in project teku by ConsenSys.
the class Web3JExecutionEngineClientTest method shouldSerializeDeserializeExecutionPayloadV1.
@TestTemplate
void shouldSerializeDeserializeExecutionPayloadV1() throws IOException {
ExecutionPayload internalExecutionPayload = dataStructureUtil.randomExecutionPayload();
ExecutionPayloadV1 executionPayloadV1Orig = ExecutionPayloadV1.fromInternalExecutionPayload(internalExecutionPayload);
String executionPayloadV1OrigSerialized = objectMapper.writeValueAsString(executionPayloadV1Orig);
ExecutionPayloadV1 executionPayloadV1New = objectMapper.readValue(executionPayloadV1OrigSerialized, ExecutionPayloadV1.class);
assertThat(executionPayloadV1Orig).isEqualTo(executionPayloadV1New);
assertThat(executionPayloadV1Orig.asInternalExecutionPayload(internalExecutionPayload.getSchema())).isEqualTo(internalExecutionPayload);
}
Aggregations