diff --git a/matrix/vm_execute.cc b/matrix/vm_execute.cc index ae463eb6c..756526661 100644 --- a/matrix/vm_execute.cc +++ b/matrix/vm_execute.cc @@ -779,6 +779,11 @@ ircd::m::vm::execute_pdu(eval &eval, // Allocate transaction; discover shared-sequenced evals. if(likely(opts.phase[phase::INDEX])) { + const scope_restore eval_phase + { + eval.phase, phase::INDEX + }; + if(!eval.txn && parent_post) eval.txn = eval.parent->txn; @@ -791,16 +796,8 @@ ircd::m::vm::execute_pdu(eval &eval, 0, // max_bytes (no max) } ); - } - - // Transaction composition. - if(likely(opts.phase[phase::INDEX])) - { - const scope_restore eval_phase - { - eval.phase, phase::INDEX - }; + // Transaction composition. write_append(eval, event); }