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

fix: prevent MinerSectorEvent panic on empty SectorStateEventso #1053

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

frrist
Copy link
Member

@frrist frrist commented Sep 1, 2022

@codecov-commenter
Copy link

Codecov Report

Merging #1053 (f5ffd8f) into master (ab09cca) will decrease coverage by 0.0%.
The diff coverage is 0.0%.

@@           Coverage Diff            @@
##           master   #1053     +/-   ##
========================================
- Coverage    34.4%   34.3%   -0.1%     
========================================
  Files          44      44             
  Lines        2930    2932      +2     
========================================
  Hits         1008    1008             
- Misses       1826    1828      +2     
  Partials       96      96             

Comment on lines +37 to +44
sectorChanges = miner.MakeSectorChanges()
preCommitChanges = miner.MakePreCommitChanges()
sectorStateChanges = &SectorStateEvents{
Removed: bitfield.New(),
Recovering: bitfield.New(),
Faulted: bitfield.New(),
Recovered: bitfield.New(),
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Ensure these are never null when passed to methods accepting them as params.

@frrist frrist requested a review from placer14 September 1, 2022 17:52
@frrist frrist merged commit eb9bc47 into master Sep 1, 2022
@frrist frrist deleted the frrist/fix-miner-events-panic branch September 1, 2022 21:08
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.

panic in MinerSectorEvents Extractor
3 participants