From 9210dd4a766d2ffae5de4d84d8db435ed17346ab Mon Sep 17 00:00:00 2001 From: AnilChinchawale Date: Sat, 26 Jan 2019 04:43:22 +0530 Subject: [PATCH] Updated ethstats for XinFin Network --- eth/gasprice/gasprice.go | 6 +++--- eth/tracers/internal/tracers/assets.go | 0 ethstats/ethstats.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 eth/tracers/internal/tracers/assets.go diff --git a/eth/gasprice/gasprice.go b/eth/gasprice/gasprice.go index f29d5a31c9..0fe0f3c513 100644 --- a/eth/gasprice/gasprice.go +++ b/eth/gasprice/gasprice.go @@ -30,6 +30,7 @@ import ( ) var maxPrice = big.NewInt(500 * params.Shannon) +var minPrice = big.NewInt(common.MinGasPrice) type Config struct { Blocks int @@ -141,9 +142,8 @@ func (gpo *Oracle) SuggestPrice(ctx context.Context) (*big.Int, error) { } // Check gas price min. - minGasPrice := big.NewInt(common.MinGasPrice) - if price.Cmp(minGasPrice) < 0 { - price = new(big.Int).Set(minGasPrice) + if price.Cmp(minPrice) < 0 { + price = new(big.Int).Set(minPrice) } gpo.cacheLock.Lock() diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go old mode 100644 new mode 100755 diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index 29e7c52a98..7587afb4f7 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -704,7 +704,7 @@ func (s *Service) reportStats(conn *websocket.Conn) error { Active: true, Mining: mining, Hashrate: hashrate, - Peers: s.eth.GetPeer(), + Peers: s.server.PeerCount(), GasPrice: gasprice, Syncing: syncing, Uptime: 100,