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

catchup: Fix empty cert if ledger already has a block #5846

Merged
merged 4 commits into from Nov 28, 2023

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Nov 27, 2023

Summary

This fixes nil pointer dereference in StoreBlock/StoreFirstBlock discovered by e2e catchup test.

algod(22258) : github.com/algorand/go-algorand/ledger.(*catchpointCatchupAccessorImpl).StoreBlock(0xc00836e480, {0x2ee95c8652e0cbe8?, 0xad49081e76d4ff29?}, 0xc009b79880, 0x0)
algod(22258) : 	github.com/algorand/go-algorand/ledger/catchupaccessor.go:1078 +0x1a0

It was introduced in #5798 and very similar to the psp fix in #4390

Test Plan

  • e2e tests pass
  • add a unit test

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3abe5c8) 55.83% compared to head (14d4f08) 55.87%.

Files Patch % Lines
catchup/catchpointService.go 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5846      +/-   ##
==========================================
+ Coverage   55.83%   55.87%   +0.03%     
==========================================
  Files         477      477              
  Lines       67256    67259       +3     
==========================================
+ Hits        37552    37580      +28     
+ Misses      27171    27131      -40     
- Partials     2533     2548      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

catchup/catchpointService_test.go Show resolved Hide resolved
catchup/catchpointService.go Outdated Show resolved Hide resolved
ledger/catchupaccessor.go Show resolved Hide resolved
@algorandskiy algorandskiy marked this pull request as ready for review November 28, 2023 02:02
@algorandskiy algorandskiy merged commit cf42837 into algorand:master Nov 28, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants