From 8102037e7f420bb71e485c86f8b570a4a9fa2363 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Wed, 1 May 2024 11:46:58 -0400 Subject: [PATCH] add status_request v1 (for finality_data range) --- include/eosio/ship_protocol.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/eosio/ship_protocol.hpp b/include/eosio/ship_protocol.hpp index d5214f0..9a6af37 100644 --- a/include/eosio/ship_protocol.hpp +++ b/include/eosio/ship_protocol.hpp @@ -80,6 +80,10 @@ namespace eosio { namespace ship_protocol { EOSIO_REFLECT(get_status_request_v0) + struct get_status_request_v1 {}; + + EOSIO_REFLECT(get_status_request_v1) + struct block_position { uint32_t block_num = {}; eosio::checksum256 block_id = {}; @@ -100,6 +104,13 @@ namespace eosio { namespace ship_protocol { EOSIO_REFLECT(get_status_result_v0, head, last_irreversible, trace_begin_block, trace_end_block, chain_state_begin_block, chain_state_end_block, chain_id) + struct get_status_result_v1 : get_status_result_v0 { + uint32_t finality_data_begin_block = {}; + uint32_t finality_data_end_block = {}; + }; + + EOSIO_REFLECT(get_status_result_v1, base get_status_result_v1, finality_data_begin_block, finality_data_end_block) + struct get_blocks_request_v0 { uint32_t start_block_num = {}; uint32_t end_block_num = {}; @@ -126,7 +137,7 @@ namespace eosio { namespace ship_protocol { EOSIO_REFLECT(get_blocks_ack_request_v0, num_messages) - using request = std::variant; + using request = std::variant; struct get_blocks_result_base { block_position head = {}; @@ -374,7 +385,7 @@ namespace eosio { namespace ship_protocol { EOSIO_REFLECT(signed_block, base signed_block_header, transactions, block_extensions) - using result = std::variant; + using result = std::variant; struct transaction_header { eosio::time_point_sec expiration = {};