Skip to content

fix: do not panic on duplicate height and priority - #70

Open
Tyagiquamar wants to merge 1 commit into
ChorusOne:mainfrom
Tyagiquamar:fix-duplicate-height-priority-panic
Open

Tyagiquamar wants to merge 1 commit into
ChorusOne:mainfrom
Tyagiquamar:fix-duplicate-height-priority-panic

Conversation

@Tyagiquamar

@Tyagiquamar Tyagiquamar commented Sep 11, 2026

Copy link
Copy Markdown

Summary

  • Stop panicking in resolvePriorities when two upgrade or version entries share the same height and priority. That panic currently kills the Blazar process from the upgrade proposals watcher.
  • If the tags match, collapse the duplicate (LOCAL over DATABASE over CHAIN) and keep the loser in the overridden list.
  • If the tags differ, return an error so the watcher can log it and keep running instead of crashing.

Fixes #56

Test plan

  • Unpatched TestSimultaneousProviders still asserts the panic on main.
  • go test -mod=readonly -count=1 ./internal/pkg/upgrades_registry in golang:1.24-bookworm (PASS, 0.106s)
  • go test -mod=readonly -race -count=1 ./internal/pkg/upgrades_registry in golang:1.24-bookworm (PASS, 1.314s)

Identical-tag entries from different providers are collapsed. Conflicting tags return an error instead of crashing the daemon.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panics if same height and priority is used for different upgrade entries

1 participant