You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
As you know, I wrote the patch for fc which throws an exception when the length of hex string (for vector<char>) is not even number. However, I found the risk that this patch makes RPC API get_block or get_block_header_state not work when it is merged to EOS repository.
In second line, there's no try-catch block for fc::variant(params.block_num_or_id).as<block_id_type>(), but when params.block_num_or_id is block_num (not block_id), and the number of its digits is odd, it throws an exception instead of executing db.fetch_block_by_number().
I think there can be several solutions for this.
Add try-catch block in chain_plugin
Allow odd-number length hex string
Revert patch for simplicity (!)
I think the first solution is correct, but I can't assure that there will be no part written like this. The second solution seems safer.
The text was updated successfully, but these errors were encountered:
@arhag
As you know, I wrote the patch for
fc
which throws an exception when the length of hex string (forvector<char
>) is not even number. However, I found the risk that this patch makes RPC APIget_block
orget_block_header_state
not work when it is merged to EOS repository.In chain_plugin.cpp:
In second line, there's no try-catch block for
fc::variant(params.block_num_or_id).as<block_id_type>()
, but whenparams.block_num_or_id
is block_num (not block_id), and the number of its digits is odd, it throws an exception instead of executing db.fetch_block_by_number().I think there can be several solutions for this.
I think the first solution is correct, but I can't assure that there will be no part written like this. The second solution seems safer.
The text was updated successfully, but these errors were encountered: