Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangui-Bitfly committed Nov 6, 2024
1 parent 14f473d commit 5832eca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions backend/pkg/commons/db2/raw/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ type compressor interface {
}

type Store struct {
store database.Database
db database.Database
compressor compressor
}

func NewStore(store database.Database) Store {
return Store{
store: store,
db: store,
compressor: gzipCompressor{},
}
}
Expand Down Expand Up @@ -80,7 +80,7 @@ func (store Store) AddBlocks(blocks []FullBlockData) error {
})
}
}
return store.store.BulkAdd(itemsByKey)
return store.db.BulkAdd(itemsByKey)
}

func (store Store) ReadBlockByNumber(chainID uint64, number int64) (*FullBlockData, error) {
Expand All @@ -94,7 +94,7 @@ func (store Store) ReadBlockByHash(chainID uint64, hash string) (*FullBlockData,

func (store Store) readBlock(chainID uint64, number int64) (*FullBlockData, error) {
key := blockKey(chainID, number)
data, err := store.store.GetRow(key)
data, err := store.db.GetRow(key)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -132,7 +132,7 @@ func (store Store) parseRow(chainID uint64, number int64, data map[string][]byte
}

func (store Store) ReadBlocksByNumber(chainID uint64, start, end int64) ([]*FullBlockData, error) {
rows, err := store.store.GetRowsRange(blockKey(chainID, start), blockKey(chainID, end))
rows, err := store.db.GetRowsRange(blockKey(chainID, start), blockKey(chainID, end))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion backend/pkg/commons/db2/raw/raw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestRaw(t *testing.T) {
}

store := Store{
store: database.Wrap(s, BlocksRawTable, ""),
db: database.Wrap(s, BlocksRawTable, ""),
compressor: noOpCompressor{},
}

Expand Down

0 comments on commit 5832eca

Please sign in to comment.