Skip to content

Commit

Permalink
ethstats: fix full node interface post 1559 (ethereum#23159)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Sep 19, 2024
1 parent c68be61 commit 6a170a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ethstats/ethstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a170a0

Please sign in to comment.