-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package eventprocessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |