aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/net.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-09 22:22:20 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-09 22:22:20 +0800
commit06afabb63105cab5ab2360d6a84cbe398b25d8ca (patch)
tree61d99eec54fca096030dfe05922488000883f4b0 /rpc/api/net.go
parent505b77a0d5f12f3a24aea9218d14bb3649cc6644 (diff)
parente84f3ec1d48f6a6c191e1f8a38d865fda3267a8a (diff)
downloaddexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.tar
dexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.tar.gz
dexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.tar.bz2
dexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.tar.lz
dexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.tar.xz
dexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.tar.zst
dexon-06afabb63105cab5ab2360d6a84cbe398b25d8ca.zip
Merge pull request #1436 from bas-vk/net_version
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
+}
+