-
Notifications
You must be signed in to change notification settings - Fork 71
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
[4.0] if actions.data & actions.hex_data provided, use the hex_data in api call get_transaction_id #1280
Conversation
@@ -41,6 +41,45 @@ parse_params<chain_apis::read_only::get_transaction_status_params, http_params_t | |||
} | |||
} | |||
|
|||
// if actions.data & actions.hex_data provided, use the hex_data since only currently support unexploded data |
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.
- As part of this effort, I think we should support exploded
data
. - As part of this effort, I think we should provide optional support for exploded
data
in cleos. For cleos, this should be optional as a user may want to prevent cleos from communicating with nodeos. Could support the option of providing abi. See--unpack-action-data
option--abi-file
. - To increase security, if both "data" and "hex_data" are provide then we should verify they are equivalent.
- Please add some tests.
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.
I added a separate issue to include exploded data handling improvements:
#1282
…lopeIO/leap into GH-1197-get-transaction-id-hex-data
} | ||
|
||
try { | ||
fc::variant trx_var = fc::json::from_string( body ); |
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.
Is it an issue that we don't use a yield function to limit the time spent in the deserialization? never mind!
It appears that logic for handling transaction as part of get_transaction_id request was different in cleos and chain_api_plugin. Resolves #1197
This PR makes a change to a logic of get_transaction_id handler as such:
caveat here that there is a few lines of code duplication between chain_api_plugin and cleos, but this is probably safest way to address initial issue without dangers of changing abi serializer