eth: small fix to make it work

This commit is contained in:
hackyminer 2018-09-09 21:11:09 +09:00
parent df4f7c867e
commit a68236fb17
No known key found for this signature in database
GPG key ID: 46D453DDCA4B766F

View file

@ -68,12 +68,12 @@ func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 {
}
// ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config.
func (api *PublicEthereumAPI) ChainId() hexutil.Uint {
func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 {
chainID := new(big.Int)
if config := api.e.chainConfig; config.IsEIP155(api.e.blockchain.CurrentBlock().Number()) {
chainID = config.ChainId
chainID = config.ChainID
}
return hexutil.Uint(chainID)
return (hexutil.Uint64)(chainID.Uint64())
}
// PublicMinerAPI provides an API to control the miner.