mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Merge pull request #427 from ngtuna/too_many_peers
correct peer on stats
This commit is contained in:
commit
102b54aff7
2 changed files with 6 additions and 2 deletions
|
|
@ -723,3 +723,7 @@ func rewardInflation(chainReward *big.Int, number uint64, blockPerYear uint64) *
|
||||||
|
|
||||||
return chainReward
|
return chainReward
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Ethereum) GetPeer() int {
|
||||||
|
return len(s.protocolManager.peers.peers)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -704,7 +704,7 @@ func (s *Service) reportStats(conn *websocket.Conn) error {
|
||||||
Active: true,
|
Active: true,
|
||||||
Mining: mining,
|
Mining: mining,
|
||||||
Hashrate: hashrate,
|
Hashrate: hashrate,
|
||||||
Peers: s.server.PeerCount(),
|
Peers: s.eth.GetPeer(),
|
||||||
GasPrice: gasprice,
|
GasPrice: gasprice,
|
||||||
Syncing: syncing,
|
Syncing: syncing,
|
||||||
Uptime: 100,
|
Uptime: 100,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue