Commit 6e7620af authored by Bas van Kervel's avatar Bas van Kervel

eth: changed NodeInfo Genesis and Head types

parent 5945a333
...@@ -752,8 +752,8 @@ func (self *ProtocolManager) txBroadcastLoop() { ...@@ -752,8 +752,8 @@ func (self *ProtocolManager) txBroadcastLoop() {
type EthNodeInfo struct { type EthNodeInfo struct {
Network int `json:"network"` // Ethereum network ID (0=Olympic, 1=Frontier, 2=Morden) 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 Difficulty *big.Int `json:"difficulty"` // Total difficulty of the host's blockchain
Genesis string `json:"genesis"` // SHA3 hash of the host's genesis block Genesis common.Hash `json:"genesis"` // SHA3 hash of the host's genesis block
Head string `json:"head"` // SHA3 hash of the host's best owned 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. // NodeInfo retrieves some protocol metadata about the running host node.
...@@ -761,7 +761,7 @@ func (self *ProtocolManager) NodeInfo() *EthNodeInfo { ...@@ -761,7 +761,7 @@ func (self *ProtocolManager) NodeInfo() *EthNodeInfo {
return &EthNodeInfo{ return &EthNodeInfo{
Network: self.networkId, Network: self.networkId,
Difficulty: self.blockchain.GetTd(self.blockchain.CurrentBlock().Hash()), Difficulty: self.blockchain.GetTd(self.blockchain.CurrentBlock().Hash()),
Genesis: fmt.Sprintf("%x", self.blockchain.Genesis().Hash()), Genesis: self.blockchain.Genesis().Hash(),
Head: fmt.Sprintf("%x", self.blockchain.CurrentBlock().Hash()), Head: self.blockchain.CurrentBlock().Hash(),
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment