From 5c0d175998ab65a364cf756878b9b1b827f7580f Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 3 Nov 2020 10:19:58 +1000 Subject: [PATCH] lib/graph: add +get-node --- pkg/arvo/lib/graph.hoon | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/arvo/lib/graph.hoon b/pkg/arvo/lib/graph.hoon index 2e2bcdf1e4..7a6c8be071 100644 --- a/pkg/arvo/lib/graph.hoon +++ b/pkg/arvo/lib/graph.hoon @@ -17,6 +17,18 @@ %+ scry-for update:store /graph/(scot %p entity.res)/[name.res] :: +++ get-node + |= [res=resource =index:store] + ^- node:store + =+ %+ scry-for ,=update:store + %+ weld + /node/(scot %p entity.res)/[name.res] + (turn index (cury scot %ud)) + ?> ?=(%0 -.update) + ?> ?=(%add-nodes -.q.update) + ?> ?=(^ nodes.q.update) + q.n.nodes.q.update +:: ++ get-update-log |= rid=resource ^- update-log:store