graph-store: Handle missing update-logs gracefully in scries

If a subscription was kicked before receiving any graph-updates on it,
then the attempt to construct a valid resubscribe path would fail, as
the scry crashes. Fixes this by handling the missing update-log case
correctly.
This commit is contained in:
Liam Fitzgerald 2021-08-12 10:16:20 +10:00
parent 3fc5db758b
commit 866cb991d6

View File

@ -647,11 +647,12 @@
=/ =term i.t.t.t.path
=/ update-log
(~(get by update-logs) [ship term])
?~ update-log [~ ~]
:- ~ :- ~ :- %noun
!>
?+ t.t.t.t.path (on-peek:def path)
~ `update-log:store`u.update-log
~
^- update-log:store
?~(update-log *update-log:store u.update-log)
::
[%latest ~]
^- (unit time)
@ -663,6 +664,7 @@
^- update-log:store
=* start i.t.t.t.t.t.path
=* end i.t.t.t.t.t.t.path
?~ update-log *update-log:store
%^ lot:orm-log
u.update-log
(slaw %da start)