Skip to content

Commit

Permalink
GH-1145 Do not allow interrupt of scheduled transactions.
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Feb 6, 2025
1 parent 0170e02 commit f0d379a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ namespace eosio::chain {
bool is_read_only()const { return trx_type == transaction_metadata::trx_type::read_only; };
bool is_transient()const { return trx_type == transaction_metadata::trx_type::read_only || trx_type == transaction_metadata::trx_type::dry_run; };
bool is_implicit()const { return trx_type == transaction_metadata::trx_type::implicit; };
bool is_scheduled()const { return trx_type == transaction_metadata::trx_type::scheduled; };
bool has_undo()const;

int64_t set_proposed_producers(vector<producer_authority> producers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ struct eosvmoc_tier {
}
#endif
// do not allow oc interrupt if no undo as the transaction needs to be undone to restart it.
// do not allow oc interrupt if implicit as deferred trx onerror execute outside the transaction retry in transaction_context.
// do not allow oc interrupt if implicit as deferred trx onerror execute as implicit outside the transaction
// retry in transaction_context. Also scheduled manage the undo stack explicitly.
const bool allow_oc_interrupt = attempt_tierup && context.is_applying_block() &&
context.trx_context.has_undo() && !context.trx_context.is_implicit();
context.trx_context.has_undo() && !context.trx_context.is_implicit() && !context.trx_context.is_scheduled();
auto ex = fc::make_scoped_exit([&]() {
if (allow_oc_interrupt) {
eos_vm_oc_compile_interrupt = false;
Expand Down

0 comments on commit f0d379a

Please sign in to comment.