aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-04 22:41:13 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-04 22:41:13 +0800
commit9b0f00baf35b7eaa323f2679a07da198369b249e (patch)
tree1de578a3e7d6d56dab01ce3630c660a6a8b127be
parent93141f4b6d0b986138853af58aacb08be1ca2bfb (diff)
downloadgo-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.tar
go-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.tar.gz
go-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.tar.bz2
go-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.tar.lz
go-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.tar.xz
go-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.tar.zst
go-tangerine-9b0f00baf35b7eaa323f2679a07da198369b249e.zip
Output net_peerCount as hex
-rw-r--r--rpc/api.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go
index d1158afe9..d82432d79 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -344,7 +344,8 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *interface{}) err
}
func (p *EthereumApi) GetPeerCount(reply *interface{}) error {
- *reply = p.xeth().PeerCount()
+ c := p.xeth().PeerCount()
+ *reply = toHex(big.NewInt(int64(c)).Bytes())
return nil
}