-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Storehouse] Fix storage snapshot #5107
Conversation
@@ -430,8 +430,8 @@ func (e *Engine) executeBlock( | |||
} | |||
|
|||
snapshot := e.execState.NewStorageSnapshot(*executableBlock.StartState, | |||
executableBlock.ID(), | |||
executableBlock.Block.Header.Height, | |||
executableBlock.Block.Header.ParentID, |
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.
This was wrong, when executing a block, the storage snapshot should be it's parent block, instead of the block itself, which has not been executed.
@@ -44,3 +45,23 @@ func (r *FinalizedReader) FinalizedBlockIDAtHeight(height uint64) (flow.Identifi | |||
func (r *FinalizedReader) BlockFinalized(h *flow.Header) { | |||
r.lastHeight.Store(h.Height) | |||
} | |||
|
|||
func (r *FinalizedReader) BlockProcessable(h *flow.Header, qc *flow.QuorumCertificate) { |
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.
not sure if there is another way to simply.
c69e9fa
to
9e0560f
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5107 +/- ##
==========================================
+ Coverage 56.33% 59.14% +2.81%
==========================================
Files 960 662 -298
Lines 90468 55132 -35336
==========================================
- Hits 50963 32610 -18353
+ Misses 35722 20230 -15492
+ Partials 3783 2292 -1491
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Makes sense, thanks for the tests!
This PR fixes an issue in creating the storage snapshot for ingestion engine