-
Notifications
You must be signed in to change notification settings - Fork 33
Interrupt speculative transaction when block received #1330
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
Conversation
|
Note:start |
…interrupt the process_block
…ition can cause issues
| my->chain_plug->chain().interrupt_apply_block_transaction(); | ||
| if (my->_is_savanna_active) { // interrupt during transition causes issues, so only allow after transition | ||
| if (fork_db_add_result == fork_db_add_t::appended_to_head) { | ||
| fc_tlog(_log, "new head block received"); |
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.
Would it make sense to have this message?
| fc_tlog(_log, "new head block received"); | |
| fc_tlog(_log, "new head block received, interrupting transaction"); |
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.
linh2931
left a comment
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.
Do we have tests to verify the new interruption?
Every savanna integration test exercises the interrupt. Every incoming block has the potential to interrupt a transaction. |
Interrupt speculative transaction execution when a block is received or on ctrl-c.
Along with the existing interrupt of transactions in a block being validated, also interrupt speculative trxs so that processing of incoming block can start immediately.
Example:
Resolves #1170