Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions chains/ethereum/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
ethcommon "github.com/ethereum/go-ethereum/common"
)

var FetchBlockInterval = time.Second / 50
var BlockRetryInterval = time.Second * 5
var BlockRetryLimit = 5
var ErrFatalPolling = errors.New("listener block polling failed")
Expand Down Expand Up @@ -107,6 +108,7 @@ func (l *listener) pollBlocks() error {
return nil
}

time.Sleep(FetchBlockInterval)
latestBlock, err := l.conn.LatestBlock()
if err != nil {
l.log.Error("Unable to get latest block", "block", currentBlock, "err", err)
Expand Down