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

Beds 90/hotfix find exec block numbers by exec block number #3000

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion handlers/api_eth1.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package handlers

import (
"context"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"math/big"
"net/http"
Expand Down Expand Up @@ -693,7 +695,9 @@ func findExecBlockNumbersByFeeRecipient(addresses [][]byte, offset, limit uint64

func findExecBlockNumbersByExecBlockNumber(execBlocks []uint64, offset, limit uint64) ([]uint64, map[uint64]types.ExecBlockProposer, error) {
var blockListSub []types.ExecBlockProposer
err := db.ReaderDb.Select(&blockListSub,
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
err := db.ReaderDb.SelectContext(ctx, &blockListSub,
`SELECT
exec_block_number,
proposer,
Expand All @@ -709,6 +713,9 @@ func findExecBlockNumbersByExecBlockNumber(execBlocks []uint64, offset, limit ui
offset,
limit,
)
if errors.Is(err, context.DeadlineExceeded) {
logger.Errorf("LONG_RUNNING_POSTGRES_READ: db.findExecBlockNumbersByExecBlockNumber: retrieving data took longer than 10s with params: execBlocks: %v, offset: %v, limit: %v: %v", execBlocks, offset, limit, err)
}
if err != nil {
return nil, nil, err
}
Expand Down
Loading