mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
eth: remove admin.peers[i].eth.head and difficulty (#26804)
This commit is contained in:
parent
d865a5d6ae
commit
4c23fe97c5
@ -17,8 +17,6 @@
|
||||
package eth
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/eth/protocols/eth"
|
||||
"github.com/ethereum/go-ethereum/eth/protocols/snap"
|
||||
)
|
||||
@ -27,8 +25,6 @@ import (
|
||||
// about a connected peer.
|
||||
type ethPeerInfo struct {
|
||||
Version uint `json:"version"` // Ethereum protocol version negotiated
|
||||
Difficulty *big.Int `json:"difficulty"` // Total difficulty of the peer's blockchain
|
||||
Head string `json:"head"` // Hex hash of the peer's best owned block
|
||||
}
|
||||
|
||||
// ethPeer is a wrapper around eth.Peer to maintain a few extra metadata.
|
||||
@ -39,12 +35,8 @@ type ethPeer struct {
|
||||
|
||||
// info gathers and returns some `eth` protocol metadata known about a peer.
|
||||
func (p *ethPeer) info() *ethPeerInfo {
|
||||
hash, td := p.Head()
|
||||
|
||||
return ðPeerInfo{
|
||||
Version: p.Version(),
|
||||
Difficulty: td,
|
||||
Head: hash.Hex(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user