Documentation ¶
Index ¶
Constants ¶
View Source
const ( OpVerify = "verify" OpStore = "store" OpFetch = "fetch" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventListener ¶ added in v0.7.0
type SelectiveListener ¶ added in v0.7.0
type SelectiveListener struct { OnSyncStepDoneCb func(op string, blockNum uint64, took time.Duration) OnReorgCb func(blockNum uint64) }
func (*SelectiveListener) OnReorg ¶ added in v0.7.0
func (l *SelectiveListener) OnReorg(blockNum uint64)
func (*SelectiveListener) OnSyncStepDone ¶ added in v0.7.0
func (l *SelectiveListener) OnSyncStepDone(op string, blockNum uint64, took time.Duration)
type Synchronizer ¶
type Synchronizer struct {
// contains filtered or unexported fields
}
Synchronizer manages a list of StarknetData to fetch the latest blockchain updates
func New ¶ added in v0.2.1
func New(bc *blockchain.Blockchain, starkNetData starknetdata.StarknetData, log utils.SimpleLogger, pendingPollInterval time.Duration, ) *Synchronizer
func (*Synchronizer) HighestBlockHeader ¶ added in v0.3.0
func (s *Synchronizer) HighestBlockHeader() *core.Header
func (*Synchronizer) Run ¶
func (s *Synchronizer) Run(ctx context.Context) error
Run starts the Synchronizer, returns an error if the loop is already running
func (*Synchronizer) StartingBlockNumber ¶ added in v0.3.0
func (s *Synchronizer) StartingBlockNumber() (uint64, error)
func (*Synchronizer) WithListener ¶ added in v0.7.0
func (s *Synchronizer) WithListener(listener EventListener) *Synchronizer
WithListener registers an EventListener
Click to show internal directories.
Click to hide internal directories.