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

Stop nominating immediately after externalize #1365

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

AndrejMitrovic
Copy link
Contributor

There is a potential for a context switch here.

I'm not sure if this is related to #1364, but it's definitely a bug. We'll test it with #1364 next week.

Copy link
Contributor

@hewison-chris hewison-chris left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #1365 (bb17e26) into v0.x.x (c0f0005) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v0.x.x    #1365      +/-   ##
==========================================
- Coverage   78.30%   78.29%   -0.02%     
==========================================
  Files         108      108              
  Lines        9026     9026              
==========================================
- Hits         7068     7067       -1     
- Misses       1958     1959       +1     
Flag Coverage Δ
integration 40.55% <100.00%> (-1.26%) ⬇️
unittests 76.71% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/node/Validator.d 93.87% <100.00%> (ø)
source/agora/network/NetworkManager.d 78.88% <0.00%> (-0.40%) ⬇️
source/agora/consensus/protocol/Nominator.d 90.87% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0f0005...bb17e26. Read the comment docs.

Comment on lines 360 to 362
super.onAcceptedBlock(block, validators_changed);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't this be better after the assert ?

The super call to `onAcceptedBlock()` can actually
cause a context switch, which means the call
to `stopNominationRound()` may be delayed.
@AndrejMitrovic
Copy link
Contributor Author

I moved it below the assert.

@AndrejMitrovic AndrejMitrovic merged commit 8a6049f into bosagora:v0.x.x Nov 16, 2020
@AndrejMitrovic AndrejMitrovic deleted the dont-switch branch November 16, 2020 03:07
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.

3 participants