aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2016-01-18 20:28:03 +0800
committerBas van Kervel <bas@ethdev.com>2016-01-18 20:28:03 +0800
commit6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9 (patch)
tree494a03c56d03750729a716957f9d2ec25a96cece /eth
parent5945a33350ea6e8bfc6308826efe16aab0e2e93d (diff)
downloadgo-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.tar
go-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.tar.gz
go-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.tar.bz2
go-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.tar.lz
go-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.tar.xz
go-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.tar.zst
go-tangerine-6e7620afe0e2b75e917c0b7c1bccd7d31a8341b9.zip
eth: changed NodeInfo Genesis and Head types
Diffstat (limited to 'eth')
-rw-r--r--eth/handler.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/eth/handler.go b/eth/handler.go
index 108a6679c..e8bac23c3 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -750,10 +750,10 @@ func (self *ProtocolManager) txBroadcastLoop() {
// EthNodeInfo represents a short summary of the Ethereum sub-protocol metadata known
// about the host peer.
type EthNodeInfo struct {
- Network int `json:"network"` // Ethereum network ID (0=Olympic, 1=Frontier, 2=Morden)
- Difficulty *big.Int `json:"difficulty"` // Total difficulty of the host's blockchain
- Genesis string `json:"genesis"` // SHA3 hash of the host's genesis block
- Head string `json:"head"` // SHA3 hash of the host's best owned block
+ Network int `json:"network"` // Ethereum network ID (0=Olympic, 1=Frontier, 2=Morden)
+ Difficulty *big.Int `json:"difficulty"` // Total difficulty of the host's blockchain
+ Genesis common.Hash `json:"genesis"` // SHA3 hash of the host's genesis block
+ Head common.Hash `json:"head"` // SHA3 hash of the host's best owned block
}
// NodeInfo retrieves some protocol metadata about the running host node.
@@ -761,7 +761,7 @@ func (self *ProtocolManager) NodeInfo() *EthNodeInfo {
return &EthNodeInfo{
Network: self.networkId,
Difficulty: self.blockchain.GetTd(self.blockchain.CurrentBlock().Hash()),
- Genesis: fmt.Sprintf("%x", self.blockchain.Genesis().Hash()),
- Head: fmt.Sprintf("%x", self.blockchain.CurrentBlock().Hash()),
+ Genesis: self.blockchain.Genesis().Hash(),
+ Head: self.blockchain.CurrentBlock().Hash(),
}
}