diff --git a/include/ircd/m/vm.h b/include/ircd/m/vm.h index 2906de0b4..8be094c8a 100644 --- a/include/ircd/m/vm.h +++ b/include/ircd/m/vm.h @@ -30,7 +30,7 @@ namespace ircd::m::vm extern ctx::shared_view accept; extern const opts default_opts; - event::id::buf commit(const m::event &, const opts & = default_opts); + fault commit(const m::event &, const opts & = default_opts); event::id::buf commit(json::iov &event, const json::iov &content, const opts & = default_opts); } diff --git a/ircd/m/vm.cc b/ircd/m/vm.cc index 53a6c4710..6a3142bba 100644 --- a/ircd/m/vm.cc +++ b/ircd/m/vm.cc @@ -122,7 +122,8 @@ ircd::m::vm::commit(json::iov &event, event, { "content", content }, }; - return commit(event, opts); + commit(event, opts); + return eid_buf; } namespace ircd::m::vm @@ -154,7 +155,7 @@ ircd::m::vm::commit_hook /// _/|/|/|/|\|\|\|\_ /// out /// -ircd::m::event::id::buf +ircd::m::vm::fault ircd::m::vm::commit(const event &event, const opts &opts) { @@ -176,9 +177,10 @@ ircd::m::vm::commit(const event &event, //TODO: X opts_.non_conform |= event::conforms::MISSING_PREV_STATE; - eval + vm::eval eval{opts_}; + const fault ret { - event, opts_ + eval(event) }; if(opts.infolog_postcommit) @@ -186,7 +188,7 @@ ircd::m::vm::commit(const event &event, vm::current_sequence, pretty_oneline(event, false)); - return unquote(at<"event_id"_>(event)); + return ret; } //