mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
graph-store: removed +mop from sur and added test validator for chat
This commit is contained in:
parent
6dddcd98e8
commit
c06eb4d8c0
@ -140,7 +140,7 @@
|
||||
%+ sort ~(tap by nodes)
|
||||
|= [p=[=index:store *] q=[=index:store *]]
|
||||
^- ?
|
||||
(lth (lent p.index) (lent q.index))
|
||||
(lth (lent index.p) (lent index.q))
|
||||
::
|
||||
++ add-node-list
|
||||
|= $: =resource:store
|
||||
|
11
pkg/arvo/mar/graph/validator/chat.hoon
Normal file
11
pkg/arvo/mar/graph/validator/chat.hoon
Normal file
@ -0,0 +1,11 @@
|
||||
/- graph=graph-store
|
||||
|_ [=atom:store =post:store]
|
||||
++ grab
|
||||
|%
|
||||
++ noun
|
||||
|= [=atom:store =post:store]
|
||||
^- [atom:store post:store]
|
||||
?> ?=([@ ~] index.post)
|
||||
[atom post]
|
||||
--
|
||||
--
|
@ -1,13 +1,5 @@
|
||||
/- *post
|
||||
|%
|
||||
++ mop
|
||||
|* [key=mold value=mold]
|
||||
|= ord=$-([key key] ?)
|
||||
|= a=*
|
||||
=/ b ;;((tree [key=key val=value]) a)
|
||||
?> (check-balance:((ordered-map key value) ord) b)
|
||||
b
|
||||
::
|
||||
+$ graph ((mop atom node) gth)
|
||||
+$ marked-graph [p=graph q=(unit mark)]
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user