Skip to content

Commit 0e7877e

Browse files
committed
remove unused func
1 parent 5a9c002 commit 0e7877e

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

backend/pkg/commons/db2/database/bigtable.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -161,29 +161,6 @@ func createTableAndFamilies(ctx context.Context, admin *bigtable.AdminClient, ta
161161
return nil
162162
}
163163

164-
type Batch struct {
165-
db Database
166-
itemsByKey map[string][]Item
167-
}
168-
169-
func NewBatch(db Database) *Batch {
170-
return &Batch{
171-
db: db,
172-
itemsByKey: make(map[string][]Item),
173-
}
174-
}
175-
176-
func (t *Batch) Add(itemsByKey map[string][]Item) {
177-
maps.Copy(t.itemsByKey, itemsByKey)
178-
}
179-
180-
func (t *Batch) Commit() error {
181-
if len(t.itemsByKey) == 0 {
182-
return nil
183-
}
184-
return t.db.BulkAdd(t.itemsByKey)
185-
}
186-
187164
func (b BigTable) BulkAdd(table string, itemsByKey map[string][]Item, opts ...Option) error {
188165
options := apply(opts)
189166

backend/pkg/commons/db2/metadataupdates/store.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ type IndexedBlock struct {
4040
Withdrawals []*types.Eth1WithdrawalIndexed
4141
}
4242

43-
func (store Store) NewBatch() *database.Batch {
44-
return database.NewBatch(store.db)
45-
}
46-
4743
// AddIndexedBlock extracts all the data to save from an IndexedBlock
4844
// Moreover it takes a list of keys as param to save the different keys update in the data.Store in case of a reorg
4945
func (store Store) AddIndexedBlock(number uint64, hash []byte, block IndexedBlock, keys []string) error {

0 commit comments

Comments
 (0)