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.
This commit is contained in:
Liam Fitzgerald 2021-02-04 13:48:00 +10:00
parent 9c30e4e126
commit ad2cd89310
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -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