Skip to content

Commit 2ab0cf3

Browse files
committed
Revert "add(exporter): sanity check for el payload exporter"
This reverts commit 9f77294.
1 parent 9043d22 commit 2ab0cf3

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

backend/pkg/exporter/modules/execution_payloads_exporter.go

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package modules
22

33
import (
4-
"bytes"
54
"context"
65
"database/sql"
76
"fmt"
@@ -155,26 +154,9 @@ func (d *executionPayloadsExporter) maintainTable() (err error) {
155154
if err != nil {
156155
return fmt.Errorf("error processing blocks: %w", err)
157156
}
158-
// sanity checks: check if any block hashes are 0x0000000000000000000000000000000000000000000000000000000000000000 or duplicate, check if count matches expected
159-
if uint64(len(resData)) != maxBlock-minBlock+1 {
160-
return fmt.Errorf("error processing blocks: expected %v blocks, got %v", maxBlock-minBlock+1, len(resData))
161-
}
162-
seen := make(map[string]bool)
163-
emptyBlockHash := bytes.Repeat([]byte{0}, 32)
164-
for _, r := range resData {
165-
if len(r.BlockHash) == 0 {
166-
return fmt.Errorf("error processing blocks: block hash is empty")
167-
}
168-
if bytes.Equal(r.BlockHash, emptyBlockHash) {
169-
return fmt.Errorf("error processing blocks: block hash is all zeros")
170-
}
171-
if _, ok := seen[string(r.BlockHash)]; ok {
172-
return fmt.Errorf("error processing blocks: duplicate block hash")
173-
}
174-
seen[string(r.BlockHash)] = true
175-
}
176157

177158
// update the execution_payloads table
159+
178160
log.Infof("preparing copy update to temp table")
179161

180162
// load data into temp table

0 commit comments

Comments
 (0)