Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Mar 22, 2024
1 parent 6abdb88 commit 735f25e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
Empty file removed internal/syncer/eventprocessor.go
Empty file.
1 change: 1 addition & 0 deletions pkg/eventprocessor/processor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package eventprocessor
11 changes: 11 additions & 0 deletions pkg/syncer/ethsyncer/ethsyncer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package ethsyncer

import (
"github.com/0xPolygon/cdk/pkg/dataavailability"
"github.com/0xPolygon/cdk/pkg/syncer/storage"
)

type EthSyncer struct {
Storage storage.Storage
DataAvailability dataavailability.DataAvailability
}
5 changes: 3 additions & 2 deletions pkg/syncer/storage/storage.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package syncer
package storage

type Storage interface {
// Storage is an interface for the storage of the syncer
type StorageService interface {
GetData() []byte
GetLatestVerifiedBlock() uint64
}
23 changes: 23 additions & 0 deletions pkg/syncer/syncer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package syncer

type Syncer interface {
// Start starts the syncer
Start() error
// Stop stops the syncer
Stop() error
// Synced returns true if the syncer is synced
Synced() bool
// SyncedChan returns a channel that is closed when the syncer is synced
SyncedChan() <-chan struct{}
// LatestVerifiedBlock returns the latest verified block
LatestVerifiedBlock() uint64
// LatestBlock returns the latest block
LatestBlock() uint64
// SyncedBlock returns the latest block that is synced
SyncedBlock() uint64
// SyncedBlockChan returns a channel that is closed when the latest block is synced
SyncedBlockChan() <-chan struct{}
}

type Sync struct {
}

0 comments on commit 735f25e

Please sign in to comment.