rpc: new RPC implementation with pub/sub support

This commit is contained in:
Bas van Kervel
2015-10-15 16:07:19 +02:00
parent 8db9d44ca9
commit eae81465c1
38 changed files with 4651 additions and 14 deletions

View File

@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/p2p"
rpc "github.com/ethereum/go-ethereum/rpc/v2"
)
var (
@ -264,3 +265,12 @@ func (n *Node) DataDir() string {
func (n *Node) EventMux() *event.TypeMux {
return n.eventmux
}
// RPCAPIs returns the collection of RPC descriptor this node offers
func (n *Node) RPCAPIs() []rpc.API {
var apis []rpc.API
for _, api := range n.services {
apis = append(apis, api.APIs()...)
}
return apis
}