Reuse apply-patch for initial-assertions too
This commit is contained in:
parent
00d50e6700
commit
f01b17dea4
|
@ -232,6 +232,7 @@
|
|||
(define (add-actor! ds name boot-proc initial-assertions)
|
||||
(define the-actor-id (generate-id! ds))
|
||||
(define filtered-initial-assertions (set-remove initial-assertions (void)))
|
||||
(define initial-delta (set->bag filtered-initial-assertions +1))
|
||||
(define the-actor (actor the-actor-id
|
||||
ds
|
||||
name
|
||||
|
@ -239,13 +240,9 @@
|
|||
#f
|
||||
(make-vector priority-count (make-queue))
|
||||
(make-queue)
|
||||
(set->bag filtered-initial-assertions +1)
|
||||
(set->bag filtered-initial-assertions -1)))
|
||||
(for [(a filtered-initial-assertions)]
|
||||
(match (bag-change! (dataspace-assertions ds) a +1)
|
||||
['absent->present (add-assertion! (dataspace-routing-table ds) a)]
|
||||
;; 'absent->absent and 'present->absent absurd
|
||||
['present->present (void)])) ;; i.e. no visible change
|
||||
initial-delta
|
||||
(bag)))
|
||||
(apply-patch! ds the-actor initial-delta)
|
||||
;; Root facet is a dummy "system" facet that exists to hold one-or-more "user" "root" facets.
|
||||
(add-facet! #f
|
||||
the-actor
|
||||
|
|
Loading…
Reference in New Issue