mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 10:02:32 +03:00
publish updates about after snapshot
This commit is contained in:
parent
3a507c364e
commit
313cbcdf3b
@ -1365,13 +1365,18 @@
|
||||
~& [%hear-pubs tea sih]
|
||||
=/ our=ship (slav %p i.t.tea)
|
||||
=/ her=ship (slav %p i.t.t.t.tea)
|
||||
?: =(0 life.sih)
|
||||
~& %ames-hear-empty-pubs
|
||||
[~ +>.$]
|
||||
=/ ded=deed
|
||||
[life.sih (~(got by pubs.sih) life.sih) oath=~]
|
||||
=/ gus (need (~(us go ton.fox) our))
|
||||
=/ diz (myx:gus her)
|
||||
?: =(0 life.sih)
|
||||
:: this should clear lew.wod.dur.diz because it means
|
||||
:: we know longer trust that their public key came to
|
||||
:: us honestly (becuse of a %jael snapshot restore).
|
||||
:: in practice, that crashes in ++cluy:las:as:go, so
|
||||
:: we ignore for now.
|
||||
~& [%ames-hear-empty-pub her]
|
||||
[~ +>.$]
|
||||
=/ ded=deed
|
||||
[life.sih (~(got by pubs.sih) life.sih) oath=~]
|
||||
=. lew.wod.dur.diz `ded
|
||||
=. ton.fox (~(su go ton.fox) (nux:gus diz))
|
||||
[~ +>.$]
|
||||
|
@ -2091,7 +2091,21 @@
|
||||
:: :: ++restore-snap:et
|
||||
++ restore-snap :: restore snapshot
|
||||
|= snap=snapshot
|
||||
:: update pub subscribers
|
||||
::
|
||||
=. +>.$
|
||||
=/ subs=(list (pair ship (set duct)))
|
||||
~(tap by yen.puk.sub)
|
||||
|- ^+ +>.^$
|
||||
?~ subs +>.^$
|
||||
=/ pub (fall (~(get by kyz.snap) p.i.subs) %*(. *public live |))
|
||||
=. +>.^$ (exec q.i.subs [%give %pubs pub])
|
||||
$(subs t.subs)
|
||||
:: update vent subscribers
|
||||
::
|
||||
=. +>.$ (vent-pass yen.eth snap+snap)
|
||||
:: keep the following in sync with ++extract-snap:file:su
|
||||
::
|
||||
%= +>.$
|
||||
eve.urb eve.snap
|
||||
etn etn.snap(source source.etn)
|
||||
@ -2099,7 +2113,29 @@
|
||||
+.eth.sub eth.snap
|
||||
sap sap(last-block 0)
|
||||
==
|
||||
::
|
||||
:: :: ++exec:et
|
||||
++ exec :: mass gift
|
||||
|= {yen/(set duct) cad/card}
|
||||
=/ noy ~(tap in yen)
|
||||
|- ^+ ..exec
|
||||
?~ noy ..exec
|
||||
$(noy t.noy, moves [[i.noy cad] moves])
|
||||
:: :: ++vent-pass:et
|
||||
++ vent-pass :: "give" vent
|
||||
|= [yen=(set duct) res=vent-result]
|
||||
=+ yez=~(tap in yen)
|
||||
|- ^+ ..vent-pass
|
||||
?~ yez ..vent-pass
|
||||
=* d i.yez
|
||||
?> ?=([[%a @ @ *] *] d)
|
||||
=+ our=(slav %p i.t.i.d)
|
||||
=+ who=(slav %p i.t.t.i.d)
|
||||
%+ exec [d ~ ~]
|
||||
:+ %pass
|
||||
/(scot %p our)/vent-result
|
||||
^- note:able
|
||||
[%a %want [our who] /j/(scot %p our)/vent-result %vent-result res]
|
||||
:: :: ++feed:su
|
||||
--
|
||||
--
|
||||
:: ::::
|
||||
|
Loading…
Reference in New Issue
Block a user