-
Notifications
You must be signed in to change notification settings - Fork 117
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
handle the case when epoch data is nil #2590
handle the case when epoch data is nil #2590
Conversation
…amer into kishan/fix/build-blocks-cc-0-9-20
… kishan/fix/build-blocks-cc-0-9-20
Looks like you merged my branch in? I'll merge my branch in to make the diff smaller. |
Does sync unit test fail locally for you? I have it failing remote on my branch as well but it seems to be fine local |
@jimjbrettj I think it's because of my bad test sometimes deadlocking, it's fixed in #2605 |
if header != nil && errors.Is(err, chaindb.ErrKeyNotFound) { | ||
epochData, err = s.getEpochDataFromMemory(epoch, header) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to get epoch data from memory: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/FYI I realised recently wrapping errors with cannot ...
or failed ...
add quite a bit of repetition when the call stack is deep, so I would suggest keeping it shorter like
return nil, fmt.Errorf("failed to get epoch data from memory: %w", err) | |
return nil, fmt.Errorf("get epoch data from memory: %w", err) |
Co-authored-by: Quentin McGaw <[email protected]>
Codecov Report
@@ Coverage Diff @@
## development #2590 +/- ##
===============================================
- Coverage 61.95% 61.89% -0.07%
===============================================
Files 215 215
Lines 28407 28420 +13
===============================================
- Hits 17600 17591 -9
- Misses 9060 9075 +15
- Partials 1747 1754 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
🎉 This PR is included in version 0.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Changes
Tests
go test -tags integration github.com/ChainSafe/gossamer
Issues
Fixes #2584
Primary Reviewer
@timwu20