Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Oct 29, 2024
1 parent 66169cd commit 0d20aba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions internal/db/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ type DbInterface interface {
*/
DeleteExpiredDelegation(ctx context.Context, stakingTxHashHex string) error
/**
* GetLastProcessedHeight retrieves the last processed height.
* GetLastProcessedBbnHeight retrieves the last processed BBN height.
* @param ctx The context
* @return The last processed height or an error
*/
GetLastProcessedBBNHeight(ctx context.Context) (uint64, error)
GetLastProcessedBbnHeight(ctx context.Context) (uint64, error)
/**
* UpdateLastProcessedBBNHeight updates the last processed BBN height.
* UpdateLastProcessedBbnHeight updates the last processed BBN height.
* @param ctx The context
* @param height The last processed height
* @return An error if the operation failed
*/
UpdateLastProcessedBBNHeight(ctx context.Context, height uint64) error
UpdateLastProcessedBbnHeight(ctx context.Context, height uint64) error
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
)

func (db *Database) GetLastProcessedBBNHeight(ctx context.Context) (uint64, error) {
func (db *Database) GetLastProcessedBbnHeight(ctx context.Context) (uint64, error) {
var result model.LastProcessedHeight
err := db.client.Database(db.dbName).
Collection(model.LastProcessedHeightCollection).
Expand All @@ -24,7 +24,7 @@ func (db *Database) GetLastProcessedBBNHeight(ctx context.Context) (uint64, erro
return result.Height, nil
}

func (db *Database) UpdateLastProcessedBBNHeight(ctx context.Context, height uint64) error {
func (db *Database) UpdateLastProcessedBbnHeight(ctx context.Context, height uint64) error {
update := bson.M{"$set": bson.M{"height": height}}
opts := options.Update().SetUpsert(true)
_, err := db.client.Database(db.dbName).
Expand Down
12 changes: 6 additions & 6 deletions tests/mocks/mock_db_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d20aba

Please sign in to comment.