Skip to content

Commit 6b6d319

Browse files
committed
ethstats: fix full node interface post 1559
1 parent 3b05318 commit 6b6d319

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ethstats/ethstats.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ type fullNodeBackend interface {
7777
Miner() *miner.Miner
7878
BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
7979
CurrentBlock() *types.Block
80-
SuggestPrice(ctx context.Context) (*big.Int, error)
80+
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
8181
}
8282

8383
// Service implements an Ethereum netstats reporting daemon that pushes local
@@ -780,8 +780,11 @@ func (s *Service) reportStats(conn *connWrapper) error {
780780
sync := fullBackend.Downloader().Progress()
781781
syncing = fullBackend.CurrentHeader().Number.Uint64() >= sync.HighestBlock
782782

783-
price, _ := fullBackend.SuggestPrice(context.Background())
783+
price, _ := fullBackend.SuggestGasTipCap(context.Background())
784784
gasprice = int(price.Uint64())
785+
if basefee := fullBackend.CurrentHeader().BaseFee; basefee != nil {
786+
gasprice += int(basefee.Uint64())
787+
}
785788
} else {
786789
sync := s.backend.Downloader().Progress()
787790
syncing = s.backend.CurrentHeader().Number.Uint64() >= sync.HighestBlock

0 commit comments

Comments
 (0)