From e5999c19ad5d8e0d5ca12a3a60e4a3ac17b28fef Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 28 May 2024 16:17:19 +0800 Subject: [PATCH] ethstats: fix full node interface post 1559 (#23159) --- ethstats/ethstats.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index 0fe575546ab5..d4872e6362e5 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -816,11 +816,11 @@ func (s *Service) reportStats(conn *connWrapper) error { sync := s.eth.Downloader().Progress() syncing = s.eth.BlockChain().CurrentHeader().Number.Uint64() >= sync.HighestBlock - tipcap, _ := s.eth.ApiBackend.SuggestGasTipCap(context.Background()) - if head := s.eth.ApiBackend.CurrentHeader(); head.BaseFee != nil { - tipcap.Add(tipcap, head.BaseFee) + price, _ := s.eth.ApiBackend.SuggestGasTipCap(context.Background()) + gasprice = int(price.Uint64()) + if basefee := s.eth.ApiBackend.CurrentHeader().BaseFee; basefee != nil { + gasprice += int(basefee.Uint64()) } - gasprice = int(tipcap.Uint64()) } else { sync := s.les.Downloader().Progress() syncing = s.les.BlockChain().CurrentHeader().Number.Uint64() >= sync.HighestBlock