Versions in this module Expand all Collapse all v0 v0.7.0 Nov 4, 2021 Changes in this version + const DefaultStepSizeForBigLag + func ListenForReceiptLogTillExit(ctx context.Context, api string, startBlock int, contract string, ...) int + type AbstractWatcher struct + BlockPlugins []plugin.IBlockPlugin + Ctx context.Context + MaxSyncedBlockToKeep int + NewBlockChan chan *structs.RemovableBlock + NewReceiptLogChan chan *structs.RemovableReceiptLog + NewTxAndReceiptChan chan *structs.RemovableTxAndReceipt + ReceiptCatchUpFromBlock uint64 + ReceiptLogPlugins []plugin.IReceiptLogPlugin + SyncedBlocks *list.List + SyncedTxAndReceipts *list.List + TxPlugins []plugin.ITxPlugin + TxReceiptPlugins []plugin.ITxReceiptPlugin + func NewHttpBasedEthWatcher(ctx context.Context, api string) *AbstractWatcher + func (watcher *AbstractWatcher) FoundFork(newBlock blockchain.Block) bool + func (watcher *AbstractWatcher) LatestSyncedBlockNum() uint64 + func (watcher *AbstractWatcher) RegisterBlockPlugin(plugin plugin.IBlockPlugin) + func (watcher *AbstractWatcher) RegisterReceiptLogPlugin(plugin plugin.IReceiptLogPlugin) + func (watcher *AbstractWatcher) RegisterTxPlugin(plugin plugin.ITxPlugin) + func (watcher *AbstractWatcher) RegisterTxReceiptPlugin(plugin plugin.ITxReceiptPlugin) + func (watcher *AbstractWatcher) RunTillExit() error + func (watcher *AbstractWatcher) RunTillExitFromBlock(startBlockNum uint64) error + func (watcher *AbstractWatcher) SetSleepSecondsForNewBlock(sec int) + type ReceiptLogWatcher struct + func NewReceiptLogWatcher(ctx context.Context, api string, startBlockNum int, contract string, ...) *ReceiptLogWatcher + func (w *ReceiptLogWatcher) GetHighestSyncedBlockNum() int + func (w *ReceiptLogWatcher) GetHighestSyncedBlockNumAndLogIndex() (int, int) + func (w *ReceiptLogWatcher) Run() error + type ReceiptLogWatcherConfig struct + IntervalForPollingNewBlockInSec int + LagToHighestBlock int + RPCMaxRetry int + ReturnForBlockWithNoReceiptLog bool + StartSyncAfterLogIndex int + StepSizeForBigLag int + type SyncSignal struct + func (s *SyncSignal) Done() + func (s *SyncSignal) Permit() + func (s *SyncSignal) WaitDone() + func (s *SyncSignal) WaitPermission()