mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-10 18:21:34 +03:00
Better change message structure.
No longer need to send separate messages for multiple non-simultaneous changes.
This commit is contained in:
parent
1c7c61c9bb
commit
72a680bfe0
@ -1980,14 +1980,15 @@
|
||||
%+ rpc-hiss w
|
||||
a+(turn (flop r) request-to-json)
|
||||
^- (list move)
|
||||
%- zing
|
||||
%+ turn
|
||||
?: =(0 ~(wyt by changes)) ~
|
||||
%+ update-to-all %difs
|
||||
%+ sort ~(tap by changes)
|
||||
:: sort by block number, then by event log number
|
||||
:: sort by block number, then by event log number,
|
||||
::TODO then by diff priority.
|
||||
|= [[[b1=@ud l1=@ud] *] [[b2=@ud l2=@ud] *]]
|
||||
?.(=(b1 b2) (lth b1 b2) (lth l1 l2))
|
||||
|= [cause=[@ud @ud] dis=(list diff-constitution)]
|
||||
(update-to-all %diff cause (flop dis))
|
||||
?. =(b1 b2) (lth b1 b2)
|
||||
?. =(l1 l2) (lth l1 l2)
|
||||
&
|
||||
::
|
||||
++ put-move
|
||||
|= mov=move
|
||||
@ -2143,7 +2144,12 @@
|
||||
^+ +>
|
||||
?- -.upd
|
||||
%full (assume +.upd)
|
||||
%diff (accept +.upd)
|
||||
::
|
||||
%difs
|
||||
|-
|
||||
?~ dis.upd +>.^$
|
||||
=. +>.^$ (accept i.dis.upd)
|
||||
$(dis.upd t.dis.upd)
|
||||
==
|
||||
::
|
||||
++ assume
|
||||
|
@ -262,7 +262,7 @@
|
||||
::
|
||||
++ update
|
||||
$% [%full ships=fleet dns=dnses heard=events]
|
||||
[%diff [block=@ud log=@ud] dis=(list diff-constitution)]
|
||||
[%difs dis=(list (pair [block=@ud log=@ud] (list diff-constitution)))]
|
||||
==
|
||||
::
|
||||
++ diff-constitution
|
||||
|
Loading…
Reference in New Issue
Block a user