Skip to content

Commit 97f317d

Browse files
fix: generic sync monitor | lint fixes
1 parent 79dbc5a commit 97f317d

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

rolling-shutter/keyperimpl/gnosis/syncstate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"github.com/shutter-network/rolling-shutter/rolling-shutter/keyperimpl/gnosis/database"
99
)
1010

11-
// GnosisSyncState implements the BlockSyncState interface for the gnosis keyper
11+
// GnosisSyncState implements the BlockSyncState interface for the gnosis keyper.
1212
type GnosisSyncState struct {
1313
DBPool *pgxpool.Pool
1414
}
1515

16-
// GetSyncedBlockNumber retrieves the current synced block number from transaction submitted events
16+
// GetSyncedBlockNumber retrieves the current synced block number from transaction submitted events.
1717
func (s *GnosisSyncState) GetSyncedBlockNumber(ctx context.Context) (int64, error) {
1818
db := database.New(s.DBPool)
1919
record, err := db.GetTransactionSubmittedEventsSyncedUntil(ctx)

rolling-shutter/keyperimpl/shutterservice/syncstate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"github.com/shutter-network/rolling-shutter/rolling-shutter/keyperimpl/shutterservice/database"
99
)
1010

11-
// ShutterServiceSyncState implements the BlockSyncState interface for the shutter service
11+
// ShutterServiceSyncState implements the BlockSyncState interface for the shutter service.
1212
type ShutterServiceSyncState struct {
1313
DBPool *pgxpool.Pool
1414
}
1515

16-
// GetSyncedBlockNumber retrieves the current synced block number from identity events
16+
// GetSyncedBlockNumber retrieves the current synced block number from identity events.
1717
func (s *ShutterServiceSyncState) GetSyncedBlockNumber(ctx context.Context) (int64, error) {
1818
db := database.New(s.DBPool)
1919
record, err := db.GetIdentityRegisteredEventsSyncedUntil(ctx)

rolling-shutter/medley/syncmonitor/syncmonitor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import (
1515
)
1616

1717
// BlockSyncState is an interface that different keyper implementations
18-
// can implement to provide their own block sync state logic
18+
// can implement to provide their own block sync state logic.
1919
type BlockSyncState interface {
20-
// GetSyncedBlockNumber retrieves the current synced block number
20+
// GetSyncedBlockNumber retrieves the current synced block number.
2121
GetSyncedBlockNumber(ctx context.Context) (int64, error)
2222
}
2323

24-
// SyncMonitor monitors the sync state of the keyper
24+
// SyncMonitor monitors the sync state of the keyper.
2525
type SyncMonitor struct {
2626
DBPool *pgxpool.Pool
2727
CheckInterval time.Duration

rolling-shutter/medley/syncmonitor/syncmonitor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import (
1414
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/testsetup"
1515
)
1616

17-
// MockSyncState is a mock implementation of BlockSyncState for testing
17+
// MockSyncState is a mock implementation of BlockSyncState for testing.
1818
type MockSyncState struct {
1919
blockNumber int64
2020
err error
2121
}
2222

23-
func (m *MockSyncState) GetSyncedBlockNumber(ctx context.Context) (int64, error) {
23+
func (m *MockSyncState) GetSyncedBlockNumber(_ context.Context) (int64, error) {
2424
return m.blockNumber, m.err
2525
}
2626

0 commit comments

Comments
 (0)