-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwriter_filter.clsp
More file actions
29 lines (24 loc) · 734 Bytes
/
writer_filter.clsp
File metadata and controls
29 lines (24 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
; writer_filter.clsp
; for DataLayer.storage by yakuhito
;; Allows the data store owner to add writers that:
;; - CAN update the store root hash, label, description, and any other metadata
;; (i.e., call the metadata updatter via the -24 condition)
;; - CANNOT update the authorized puzzles list
;; (i.e., cannot use the -13 condition)
(mod (
INNER_PUZZLE
inner_solution
)
(defun morph_conditions (conditions)
(if conditions
(if (= (f (f conditions)) -13) ; don't allow updating merkle root
(x)
; else
(c (f conditions) (morph_conditions (r conditions)))
)
; else - all conditions checked
()
)
)
(morph_conditions (a INNER_PUZZLE inner_solution))
)