-
Notifications
You must be signed in to change notification settings - Fork 41
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
get batch data by number api #1090
Conversation
Looks like this breaks kurtosis - please investigate! |
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.
Small stuff
cmd/rpcdaemon/commands/zkevm_api.go
Outdated
@@ -320,6 +320,16 @@ func (api *ZkEvmAPIImpl) GetBatchDataByNumbers(ctx context.Context, batchNumbers | |||
continue | |||
} | |||
|
|||
// try to find the BatchData in db to avoid calculate it when it is possible | |||
batchData, err := hermezDb.GetL1BatchData(batchNumber.Uint64()) |
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.
We probably should extract the rest as “GenerateL1BatchData” to have the whole structure more clear. Otherwise it’s okay.
This is already done, closing. |
Quality Gate passedIssues Measures |
This PR adds a modification in GetBatchDataByNumbers endpoint to avoid calculate batchData when it is stored in db