mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd:Ⓜ️:room::bootstrap: Perform pre-sort for full received auth_chain.
This commit is contained in:
parent
05242aaa90
commit
97bb18d2e6
1 changed files with 10 additions and 1 deletions
|
@ -530,16 +530,25 @@ catch(const std::exception &e)
|
|||
}
|
||||
|
||||
void
|
||||
ircd::m::roomstrap::eval_auth_chain(const json::array &auth_chain,
|
||||
ircd::m::roomstrap::eval_auth_chain(const json::array &auth_chain_,
|
||||
vm::opts vmopts)
|
||||
try
|
||||
{
|
||||
std::vector<m::event> auth_chain
|
||||
(
|
||||
begin(auth_chain_), end(auth_chain_)
|
||||
);
|
||||
|
||||
log::info
|
||||
{
|
||||
log, "Evaluating %zu authentication events...",
|
||||
auth_chain.size(),
|
||||
};
|
||||
|
||||
// pre-sort here and indicate that to eval.
|
||||
std::sort(begin(auth_chain), end(auth_chain));
|
||||
vmopts.ordered = true;
|
||||
|
||||
vmopts.nothrows = vm::fault::EXISTS;
|
||||
vmopts.fetch = false;
|
||||
m::vm::eval
|
||||
|
|
Loading…
Reference in a new issue