-\ForAll{$\tuple{s_i,sv_i} \in SL_c$}\r
- \State $s_i \gets SeqN(\tuple{s_i,sv_i})$\r
- \State $sv_i \gets SlotVal(\tuple{s,sv_i})$\r
- \State $Dat_i \gets Decrypt(SK,sv_i)$\r
- \State $s_s \gets GetSeqN(Dat_s)$\r
- \If{$s_i \neq s_s$}\r
- \State $error \gets$ 'Invalid sequence number'\r
+\State $\tuple{s_{c_{max}},sv_{c_{max}}} \gets MaxSlot(SL_c)$\r
+\State $s_{c_{max}} \gets SeqN(\tuple{s_{c_{max}},sv_{c_{max}}})$\r
+\State $\tuple{s_{c_{min}},sv_{c_{min}}} \gets MinSlot(SL_c)$\r
+\State $s_{c_{min}} \gets SeqN(\tuple{s_{c_{max}},sv_{c_{max}}})$\r
+%\For{$\{\tuple{s_c,sv_c} \mid \tuple{s_c,sv_c} \in SL_c\}$}\r
+\For{$s_c \gets s_{c_{min}}$ \textbf{to} $s_{c_{max}}$}\r
+ \State $\tuple{s_c,sv_c} \gets Slot(SL_c,s_c)$\r
+ \State $s_c \gets SeqN(\tuple{s_c,sv_c})$\r
+ \State $sv_c \gets SlotVal(\tuple{s_c,sv_c})$\r
+ \State $Dat_c \gets Decrypt(SK,sv_c)$\r
+ \State $s_{c_{in}} \gets GetSeqN(Dat_c)$\r
+ \If{$s_c \neq s_{c_{in}}$}\r
+ \State \Call{ReportError}{'Invalid sequence number'}\r