Skip to content

Commit

Permalink
only show one hop of fwd auth dag
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed Dec 18, 2024
1 parent 32077d0 commit 39df161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,19 +237,19 @@ const redraw = (vis: HTMLDivElement, events: MatrixEvent[], opts: RenderOptions)

if (opts.showAuthDAG) {
// walk the DAG to the root to get authed & authing events
d.auth_list = [];
const walk = (e) => {
e.authed_list ||= [];
e.authed_list.push(d.event_id);
for (const id of e.prev_auth_events) {
d.auth_list.push(id);
walk(eventsById.get(id));
}
};
walk(d);
}

d.auth_list = [];
for (const id of authEvents) {
d.auth_list.push(id);
const p = eventsById.get(id)!;
if (!p.authLane) {
const lane = getNextAuthLane(p.y, i);
Expand Down

0 comments on commit 39df161

Please sign in to comment.