From ad2cd893108a460aa00468f2b41c6cc75da42aaa Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 4 Feb 2021 13:48:00 +1000 Subject: [PATCH] hark-store: crash on invalid note read Two %read-note actions set on the same notification could cause the cache to become invalid. Instead, crash if we read a note that is already read. --- pkg/arvo/app/hark-store.hoon | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/arvo/app/hark-store.hoon b/pkg/arvo/app/hark-store.hoon index 106e62045..43bfac47c 100644 --- a/pkg/arvo/app/hark-store.hoon +++ b/pkg/arvo/app/hark-store.hoon @@ -448,6 +448,7 @@ &(=(read read.u.not) !?=(?(%read-note %unread-note) -.in)) ~& >> "Inconsistent hark cache, rebuilding" rebuild-cache + ?< &(=(read read.u.not) ?=(?(%read-note %unread-note) -.in)) =. u.tib (~(put by u.tib) index u.not(read read)) =. notifications