Skip to content

Commit 6c85b47

Browse files
committed
chore: undo contract change, since usage is safe
1 parent bf69bbf commit 6c85b47

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

stacks/contracts/wormhole-core-state.clar

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@
185185
(let ((registration (try! (contract-call? .addr32 register emitter)))
186186
(sequence (default-to u0 (emitter-sequence-get emitter))))
187187
;; If `sequence` has reached its limit we cannot continue
188-
(asserts! (< sequence MAX_VALUE_U64) ERR_STATE_OVERFLOW_SEQUENCE)
188+
(asserts! (<= sequence MAX_VALUE_U64) ERR_STATE_OVERFLOW_SEQUENCE)
189+
;; This is SAFE and won't overflow since `sequence` is a `u128`
189190
(map-set emitter-sequence emitter (+ sequence u1))
190191
(ok (merge
191192
registration

0 commit comments

Comments
 (0)