Skip to content

fix(bft): handle empty proposal slices - #529

Open
pekkahcut wants to merge 1 commit into
canopy-network:mainfrom
pekkahcut:fix-empty-proposal-panic
Open

fix(bft): handle empty proposal slices#529
pekkahcut wants to merge 1 commit into
canopy-network:mainfrom
pekkahcut:fix-empty-proposal-panic

Conversation

@pekkahcut

Copy link
Copy Markdown

getProposal could panic when the proposal key exists but the slice is empty.

This can happen after a new committee reset when there isn't a round 0 election candidate yet.

Added a length check and a regression test.

Tested with go test ./bft -count=1.

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.

1 participant