From d9e5856b66ea2b07017a1168e859fe0ad510b2c7 Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 21 May 2018 23:53:06 +0200 Subject: [PATCH] Sort the changes we send out to ensure they are in chronological order. --- sys/vane/jael.hoon | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/vane/jael.hoon b/sys/vane/jael.hoon index d0e9e2f9a..8c199700a 100644 --- a/sys/vane/jael.hoon +++ b/sys/vane/jael.hoon @@ -1981,7 +1981,11 @@ a+(turn (flop r) request-to-json) ^- (list move) %- zing - %+ turn ~(tap by changes) + %+ turn + %+ sort ~(tap by changes) + :: sort by block number, then by event log number + |= [[[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)) ::