mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️:vm: Fix return values for commit() suite.
This commit is contained in:
parent
7180eae4af
commit
969bc127e8
2 changed files with 8 additions and 6 deletions
|
@ -30,7 +30,7 @@ namespace ircd::m::vm
|
|||
extern ctx::shared_view<accepted> 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);
|
||||
}
|
||||
|
||||
|
|
12
ircd/m/vm.cc
12
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;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue