Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Create action_trace & action_receipt on hard_fail #5957

Merged
merged 9 commits into from
Oct 11, 2018
Merged

Conversation

heifner
Copy link
Contributor

@heifner heifner commented Oct 10, 2018

  • hard_fail was creating default constructed action_trace to be added to transaction_trace
  • Fill out action_trace and action_receipt even when exception while processing action
  • Add optional except to action_trace to store exception that is also stored on transaction_trace
  • Note: Includes change to action_trace which will likely cause problems with history_plugin unless full replay

…n action throws exception. This provides action information even on hard_fail which previously generated a default constructed action_trace.
@heifner heifner requested a review from arhag October 10, 2018 17:21
@heifner heifner changed the title Create action_trace & action_receipt on hard_fail [DO NOT MERGE] Create action_trace & action_receipt on hard_fail Oct 11, 2018

trx_context.executed.emplace_back( move(r) );

if ( control.contracts_console() ) {
print_debug(receiver, t);
print_debug(receiver, trace);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print_debug will be passed a trace with an empty console since it hasn't been set yet with finalize_trace. It should be moved to after the finalize_trace call below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

@heifner heifner changed the title [DO NOT MERGE] Create action_trace & action_receipt on hard_fail Create action_trace & action_receipt on hard_fail Oct 11, 2018
@heifner
Copy link
Contributor Author

heifner commented Oct 11, 2018

Note I had to move the setting of r.code_sequence and r.abi_sequence to after action execution because they can change. I figured since I moved them I might as well move the other receipt settings that modify db after the execution as well.

@heifner heifner merged commit 355e02e into develop Oct 11, 2018
@heifner heifner deleted the action-trace-except branch October 11, 2018 19:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants