-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IF: add get_blocks_result_v1 support to SHiP #2349
Conversation
plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
Show resolved
Hide resolved
plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
Outdated
Show resolved
Hide resolved
…esult_v0 based on finality_data_history argument
plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
Outdated
Show resolved
Hide resolved
plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
Outdated
Show resolved
Hide resolved
plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
Outdated
Show resolved
Hide resolved
plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
Show resolved
Hide resolved
tests/ship_streamer.cpp
Outdated
eosio::check(std::string(result_document[0].GetString()) == "get_blocks_result_v0", "result type doesn't look like get_blocks_result_v0"); | ||
if( fetch_finality_data ) { | ||
eosio::check(std::string(result_document[0].GetString()) == "get_blocks_result_v1", "result type doesn't look like get_blocks_result_v1"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need the if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. Missed that one. Thanks.
Note:start |
#2321 added SHiP support for IBC. A new
get_blocks_request_v1
was introduced to include a fieldfetch_finality_data
, but existingget_blocks_result_v0
was reused to return the result ofget_blocks_request_v1
. That can cause confusions to the users, and a client's ABIbin_to_json()
would add an extra"finality_data": null
to the JSON output in Legacy (asfinality_data
does not exist).This PR adds
get_blocks_result_v1
which stores the result ofget_blocks_request_v1
;get_blocks_result_v0
is restored to its original use: only storing the result ofget_blocks_result_v0
.get_blocks_request_v1
adds extraget_blocks_request_v1
toget_blocks_request_v0
;get_blocks_result_v1
adds extrafinality_data
toget_blocks_result_v0
.Tests are updated to check both
get_blocks_result_v0
andget_blocks_result_v1
work.Resolved #2340