Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consensus: fix deadlock #2027

Merged
merged 3 commits into from Jun 27, 2020
Merged

consensus: fix deadlock #2027

merged 3 commits into from Jun 27, 2020

Conversation

AdoAdoAdo
Copy link
Contributor

@AdoAdoAdo AdoAdoAdo commented Jun 26, 2020

Fixing deadlock when setting alarms for delayed broadcast data.

@sasurobert sasurobert self-requested a review June 26, 2020 18:43
if bmm.PrepareBroadcastHeaderValidatorCalled != nil {
return bmm.PrepareBroadcastHeaderValidatorCalled(
_ = bmm.PrepareBroadcastHeaderValidatorCalled(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change called function to not return err

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

dbb.delayedBroadcastData = dbb.delayedBroadcastData[i+1:]
return
break OuterLoop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a first. Can we refactor this? Maybe split in another function?

Copy link
Contributor

@iulianpascalau iulianpascalau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might change the break OuterLoop line one day

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System tests passed.

@sasurobert sasurobert merged commit 5a869d3 into development Jun 27, 2020
@sasurobert sasurobert deleted the fix-deadlock-consensus branch June 27, 2020 06:42
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.

None yet

4 participants