mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-03 02:35:52 +03:00
contact-store: enforce timestamp ordering on %initial
This commit is contained in:
parent
58faf16872
commit
dbafffd783
@ -104,7 +104,14 @@
|
|||||||
|= [rolo=rolodex:store is-public=?]
|
|= [rolo=rolodex:store is-public=?]
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
=/ our-contact (~(got by rolodex) our.bowl)
|
=/ our-contact (~(got by rolodex) our.bowl)
|
||||||
=. rolodex (~(uni by rolodex) rolo)
|
::
|
||||||
|
=/ diff-rolo=rolodex:store
|
||||||
|
%- ~(gas by *rolodex:store)
|
||||||
|
%+ skim ~(tap in rolo)
|
||||||
|
|= [=ship =contact:store]
|
||||||
|
?~ local-con=(~(get by rolodex) ship) %.y
|
||||||
|
(gth last-updated.contact last-updated.u.local-con)
|
||||||
|
=. rolodex (~(uni by rolodex) diff-rolo)
|
||||||
=. rolodex (~(put by rolodex) our.bowl our-contact)
|
=. rolodex (~(put by rolodex) our.bowl our-contact)
|
||||||
:_ state(rolodex rolodex)
|
:_ state(rolodex rolodex)
|
||||||
(send-diff [%initial rolodex is-public] %.n)
|
(send-diff [%initial rolodex is-public] %.n)
|
||||||
|
Loading…
Reference in New Issue
Block a user