mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
eth: embed range in peerInfo
This commit is contained in:
parent
3571ef3647
commit
6b193040bd
1 changed files with 3 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ import (
|
|||
// about a connected peer.
|
||||
type ethPeerInfo struct {
|
||||
Version uint `json:"version"` // Ethereum protocol version negotiated
|
||||
BlockRange *peerBlockRange `json:"blockRange"`
|
||||
*peerBlockRange
|
||||
}
|
||||
|
||||
type peerBlockRange struct {
|
||||
|
|
@ -45,7 +45,7 @@ type ethPeer struct {
|
|||
func (p *ethPeer) info() *ethPeerInfo {
|
||||
info := ðPeerInfo{Version: p.Version()}
|
||||
if br := p.BlockRange(); br != nil {
|
||||
info.BlockRange = &peerBlockRange{
|
||||
info.peerBlockRange = &peerBlockRange{
|
||||
Earliest: br.EarliestBlock,
|
||||
Latest: br.LatestBlock,
|
||||
LatestHash: br.LatestBlockHash,
|
||||
|
|
|
|||
Loading…
Reference in a new issue