Skip to content

Commit

Permalink
fix: relayer division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Dec 26, 2024
1 parent 520b66b commit 5b1fb5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/relay-emulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ func main() {
return
}

if len(registeredKeys) == 0 {
http.Error(w, "No registered keys", http.StatusInternalServerError)
return
}

idx := int(blockNumber) % len(registeredKeys)
registeredLock.RLock()
key := registeredKeys[idx]
Expand Down

0 comments on commit 5b1fb5a

Please sign in to comment.