mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-07 07:30:23 +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
|
%- pre-bake
|
||||||
ta-done:ta-init:ta
|
ta-done:ta-init:ta
|
||||||
=. stories.u.old
|
=. stories.u.old
|
||||||
%- ~(run by stories.u.old)
|
%- ~(urn by stories.u.old)
|
||||||
|= s/story
|
|= {nom/naem soy/story}
|
||||||
s(count (lent grams.s))
|
=+ %+ 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)]
|
[~ ..prep(+<+ u.old)]
|
||||||
::
|
::
|
||||||
::> ||
|
::> ||
|
||||||
|
@ -118,6 +118,12 @@
|
|||||||
^- (quip move _..prep)
|
^- (quip move _..prep)
|
||||||
?~ old
|
?~ old
|
||||||
ta-done:ta-init:ta
|
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)]
|
[~ ..prep(+<+ u.old)]
|
||||||
::
|
::
|
||||||
::> ||
|
::> ||
|
||||||
|
Loading…
Reference in New Issue
Block a user