mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Add logic for rebuilding state that refers to messages by numbers.
Because count used to be incorrect, messages are being referred to by incorrect indices. This rebuilds all count-dependent data.
This commit is contained in:
parent
0a24fd09fb
commit
0e04242148
@ -123,9 +123,18 @@
|
||||
%- pre-bake
|
||||
ta-done:ta-init:ta
|
||||
=. stories.u.old
|
||||
%- ~(run by stories.u.old)
|
||||
|= s/story
|
||||
s(count (lent grams.s))
|
||||
%- ~(urn by stories.u.old)
|
||||
|= {nom/naem soy/story}
|
||||
=+ %+ roll grams.soy
|
||||
|= {t/telegram c/@ud k/(map serial @ud) s/(map circle (list @ud))}
|
||||
:+ +(c) (~(put by k) uid.t c)
|
||||
=/ src/circle
|
||||
?: (~(has by aud.t) [our.bol nom]) [our.bol nom]
|
||||
?~ aud.t ~&(%strange-aud [our.bol %inbox])
|
||||
n.aud.t
|
||||
%+ ~(put by s) src
|
||||
[c (fall (~(get by s) src) ~)]
|
||||
soy(count c, known k, sourced s)
|
||||
[~ ..prep(+<+ u.old)]
|
||||
::
|
||||
::> ||
|
||||
|
@ -118,6 +118,12 @@
|
||||
^- (quip move _..prep)
|
||||
?~ old
|
||||
ta-done:ta-init:ta
|
||||
=* o u.old
|
||||
=. count.o (lent grams.o)
|
||||
=+ %+ reel grams.o
|
||||
|= {t/telegram c/@ud k/(map serial @ud)}
|
||||
[+(c) (~(put by k) uid.t c)]
|
||||
=. known.o k
|
||||
[~ ..prep(+<+ u.old)]
|
||||
::
|
||||
::> ||
|
||||
|
Loading…
Reference in New Issue
Block a user