Merge pull request #6595 from urbit/jb/stir-ames-rift

ames: add %rift to %stir
This commit is contained in:
Ted Blackman 2023-05-17 20:31:33 -04:00 committed by GitHub
commit 58aed9ccfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1755,6 +1755,20 @@
++ on-stir ++ on-stir
|= arg=@t |= arg=@t
^+ event-core ^+ event-core
|^ ?+ arg do-stir
%rift do-rift
==
::
++ do-rift
=/ =rift
=- ~|(%no-rift (,@ q.q:(need (need -))))
(rof ~ %j `beam`[[our %rift %da now] /(scot %p our)])
?: =(rift rift.ames-state)
event-core
~& "ames: fixing rift from {<rift.ames-state>} to {<rift>}"
event-core(ames-state ames-state(rift rift))
::
++ do-stir
=/ want=(set [@da ^duct]) =/ want=(set [@da ^duct])
%- ~(rep by peers.ames-state) %- ~(rep by peers.ames-state)
|= [[who=ship s=ship-state] acc=(set [@da ^duct])] |= [[who=ship s=ship-state] acc=(set [@da ^duct])]
@ -1790,6 +1804,7 @@
|= [[wen=@da hen=^duct] this=_event-core] |= [[wen=@da hen=^duct] this=_event-core]
?> ?=([^ *] hen) ?> ?=([^ *] hen)
(emit:this t.hen %pass t.i.hen %b %rest wen) (emit:this t.hen %pass t.i.hen %b %rest wen)
--
:: +on-crud: handle event failure; print to dill :: +on-crud: handle event failure; print to dill
:: ::
++ on-crud ++ on-crud