mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd:Ⓜ️:vm: Add vmopts for room_head related.
This commit is contained in:
parent
35fee056f9
commit
ab2490ce73
2 changed files with 13 additions and 0 deletions
|
@ -119,6 +119,17 @@ struct ircd::m::vm::opts
|
|||
/// update the optimized present state table of the room if it is proper.
|
||||
bool present {true};
|
||||
|
||||
/// Toggles whether event may be added to the room head table which means
|
||||
/// it is considered unreferenced by any other event at this time. It is
|
||||
/// safe for this to always be true if events are evaluated in order. If
|
||||
/// `present` is false this should be set to false but they are not tied.
|
||||
bool head {true};
|
||||
|
||||
/// Toggles whether the prev_events of this event are removed from the
|
||||
/// room head table, now that this event has referenced them. It is safe
|
||||
/// for this to always be true.
|
||||
bool refs {true};
|
||||
|
||||
/// Toggles whether the state btree is updated; this should be consistently
|
||||
/// true or false for all events in a room.
|
||||
bool history {true};
|
||||
|
|
|
@ -444,6 +444,8 @@ ircd::m::vm::_eval_pdu(eval &eval,
|
|||
m::dbs::write_opts wopts;
|
||||
wopts.present = opts.present;
|
||||
wopts.history = opts.history;
|
||||
wopts.head = opts.head;
|
||||
wopts.refs = opts.refs;
|
||||
wopts.idx = eval.sequence;
|
||||
|
||||
eval_hook(event);
|
||||
|
|
Loading…
Reference in a new issue