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

ChainStore: Add a tiebreaker rule for tipsets of equal weight #7378

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Sep 22, 2021

@arajasek arajasek requested a review from a team as a code owner September 22, 2021 20:48
@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #7378 (44405bd) into feat/nv14 (e68c8cb) will decrease coverage by 0.03%.
The diff coverage is 86.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##           feat/nv14    #7378      +/-   ##
=============================================
- Coverage      39.30%   39.27%   -0.04%     
=============================================
  Files            627      627              
  Lines          66084    66096      +12     
=============================================
- Hits           25975    25958      -17     
- Misses         35632    35652      +20     
- Partials        4477     4486       +9     
Impacted Files Coverage Δ
chain/store/store.go 64.76% <86.66%> (-0.32%) ⬇️
markets/loggers/loggers.go 89.28% <0.00%> (-10.72%) ⬇️
chain/events/observer.go 71.64% <0.00%> (-6.72%) ⬇️
chain/types/tipset_key.go 85.96% <0.00%> (-3.51%) ⬇️
chain/sub/incoming.go 54.43% <0.00%> (-3.38%) ⬇️
chain/gen/gen.go 66.06% <0.00%> (-1.22%) ⬇️
miner/miner.go 55.62% <0.00%> (-1.00%) ⬇️
chain/messagepool/messagepool.go 56.87% <0.00%> (-0.87%) ⬇️
chain/messagepool/selection.go 80.52% <0.00%> (-0.82%) ⬇️
... and 6 more

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 e68c8cb...44405bd. Read the comment docs.

@arajasek arajasek added this to the Network v14 milestone Sep 24, 2021
if w.GreaterThan(heaviestW) {
heavier := w.GreaterThan(heaviestW)
if w.Equals(heaviestW) && !ts.Equals(cs.heaviest) {
log.Errorw("weight draw", "currTs", cs.heaviest, "ts", ts)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could log the result of breakWeightTie

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yessir will do

Copy link
Contributor

Choose a reason for hiding this comment

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

probably could downgrade it, it was error due to the lack of tie breaker

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