aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/net.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-07-08 14:03:20 +0800
committerBas van Kervel <bas@ethdev.com>2015-07-08 14:03:20 +0800
commite84f3ec1d48f6a6c191e1f8a38d865fda3267a8a (patch)
tree394cd95dcd7940e9031184fdc201ab29a465ae3d /rpc/api/net.go
parenta2333bcbb46245e07357be1f9af4108e9bf1fe40 (diff)
downloaddexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.tar
dexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.tar.gz
dexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.tar.bz2
dexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.tar.lz
dexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.tar.xz
dexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.tar.zst
dexon-e84f3ec1d48f6a6c191e1f8a38d865fda3267a8a.zip
added net.version
Diffstat (limited to 'rpc/api/net.go')
-rw-r--r--rpc/api/net.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/api/net.go b/rpc/api/net.go
index dbed9e11e..d8b636b02 100644
--- a/rpc/api/net.go
+++ b/rpc/api/net.go
@@ -32,6 +32,7 @@ var (
netMapping = map[string]nethandler{
"net_peerCount": (*netApi).PeerCount,
"net_listening": (*netApi).IsListening,
+ "net_version": (*netApi).Version,
}
)
@@ -93,3 +94,7 @@ func (self *netApi) IsListening(req *shared.Request) (interface{}, error) {
return self.xeth.IsListening(), nil
}
+func (self *netApi) Version(req *shared.Request) (interface{}, error) {
+ return self.xeth.NetworkVersion(), nil
+}
+