mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-10 10:05:09 +03:00
graph-store: add dm validator
This commit is contained in:
parent
3f7d08285e
commit
097bae6fb7
@ -49,12 +49,12 @@
|
||||
%add-nodes
|
||||
?> ?=([@ %inbox] resource.q.update)
|
||||
?: =(our.bowl src.bowl)
|
||||
(incoming-add nodes.q.update)
|
||||
(outgoing-add nodes.q.update)
|
||||
(incoming-add nodes.q.update)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ incoming-add
|
||||
++ outgoing-add
|
||||
|= nodes=(map index:store node:store)
|
||||
^- (list card)
|
||||
%- zing
|
||||
@ -73,7 +73,7 @@
|
||||
:+ %add-nodes [our.bowl %inbox]
|
||||
(~(gas by *(map index:store node:store)) [index node] ~)
|
||||
::
|
||||
++ outgoing-add
|
||||
++ incoming-add
|
||||
|= nodes=(map index:store node:store)
|
||||
^- (list card)
|
||||
?> =(1 ~(wyt by nodes))
|
||||
|
23
pkg/arvo/mar/graph/validator/dm.hoon
Normal file
23
pkg/arvo/mar/graph/validator/dm.hoon
Normal file
@ -0,0 +1,23 @@
|
||||
/- *post, met=metadata-store, graph=graph-store, hark=hark-graph-hook
|
||||
|_ i=indexed-post
|
||||
++ grow
|
||||
|%
|
||||
++ noun i
|
||||
++ notification-kind
|
||||
^- (unit notif-kind:hark)
|
||||
?+ index.p.i ~
|
||||
[@ ~] `[%message [0 1] %count %none]
|
||||
==
|
||||
::
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun
|
||||
|= p=*
|
||||
=/ ip ;;(indexed-post p)
|
||||
?> ?=(?([@ ~] [@ @ ~]) index.p.ip)
|
||||
ip
|
||||
--
|
||||
::
|
||||
++ grad %noun
|
||||
--
|
Loading…
Reference in New Issue
Block a user