mirror of
https://github.com/grassrootseconomics/eth-tracker.git
synced 2026-05-18 10:45:21 +02:00
special: backport old celo geth to latest eth-tracker codebase
This commit is contained in:
@@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/celo-org/celo-blockchain"
|
||||
"github.com/celo-org/celo-blockchain/core/types"
|
||||
"github.com/celo-org/celo-blockchain/event"
|
||||
)
|
||||
|
||||
type BlockQueueFn func(uint64) error
|
||||
@@ -23,7 +23,7 @@ func (s *Syncer) Start() {
|
||||
s.realtimeSub = event.ResubscribeErr(resubscribeInterval, s.resubscribeFn())
|
||||
}
|
||||
|
||||
func (s *Syncer) receiveRealtimeBlocks(ctx context.Context, fn BlockQueueFn) (ethereum.Subscription, error) {
|
||||
func (s *Syncer) receiveRealtimeBlocks(ctx context.Context, fn BlockQueueFn) (celo.Subscription, error) {
|
||||
newHeadersReceiver := make(chan *types.Header, 1)
|
||||
sub, err := s.ethClient.SubscribeNewHead(ctx, newHeadersReceiver)
|
||||
s.logg.Info("realtime syncer connected to ws endpoint")
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"log/slog"
|
||||
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/celo-org/celo-blockchain"
|
||||
"github.com/celo-org/celo-blockchain/ethclient"
|
||||
"github.com/grassrootseconomics/eth-tracker/db"
|
||||
"github.com/grassrootseconomics/eth-tracker/internal/chain"
|
||||
"github.com/grassrootseconomics/eth-tracker/internal/pool"
|
||||
@@ -27,7 +27,7 @@ type (
|
||||
db db.DB
|
||||
ethClient *ethclient.Client
|
||||
logg *slog.Logger
|
||||
realtimeSub ethereum.Subscription
|
||||
realtimeSub celo.Subscription
|
||||
pool *pool.Pool
|
||||
stats *stats.Stats
|
||||
stopCh chan struct{}
|
||||
|
||||
Reference in New Issue
Block a user