added net API
This commit is contained in:
parent
87dace1fa9
commit
1fe617fa57
@ -7,6 +7,10 @@ import (
|
||||
"github.com/ethereum/go-ethereum/xeth"
|
||||
)
|
||||
|
||||
const (
|
||||
NetApiVersion = "1.0"
|
||||
)
|
||||
|
||||
var (
|
||||
// mapping between methods and handlers
|
||||
netMapping = map[string]nethandler{
|
||||
@ -62,6 +66,10 @@ func (self *netApi) Name() string {
|
||||
return NetApiName
|
||||
}
|
||||
|
||||
func (self *netApi) ApiVersion() string {
|
||||
return NetApiVersion
|
||||
}
|
||||
|
||||
// Network version
|
||||
func (self *netApi) Version(req *shared.Request) (interface{}, error) {
|
||||
return self.xeth.NetworkVersion(), nil
|
||||
|
Loading…
Reference in New Issue
Block a user