https://github.com/AntelopeIO/leap/pull/2321 added SHiP support for IBC. A new get_blocks_request_v1 was introduced to include a field fetch_finality_data, but existing get_blocks_result_v0 was reused to return the result of get_blocks_request_v1. That can cause confusions to the users, and a client's ABI bin_to_json() would add an extra "finality_data": null to the JSON output in Legacy (as finality_data does not exist).
This PR adds get_blocks_result_v1 which stores the result of get_blocks_request_v1; get_blocks_result_v0 is restored to its original use: only storing the result of get_blocks_result_v0.
get_blocks_request_v1 adds extra get_blocks_request_v1 to get_blocks_request_v0; get_blocks_result_v1 adds extra finality_data to get_blocks_result_v0.
Note:start
group: IF
category: INTERNALS
summary: Adds get_blocks_result_v1 to SHiP as part of IBC support; get_blocks_result_v0 is restored to its original use.
Note:end
https://github.com/AntelopeIO/leap/pull/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 https://github.com/AntelopeIO/leap/issues/2340