diff options
author | Felix Lange <fjl@twurst.com> | 2015-12-15 00:38:10 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-12-15 00:38:10 +0800 |
commit | fa187a366dda1894179635eeec2a929bfacc4ad3 (patch) | |
tree | 4494d4dcded47dd49f2fe7374e85fefa9249246e /node/node.go | |
parent | 787d71d6595df98586c625e82f4decb034215203 (diff) | |
parent | eae81465c1c815c317cd30e4de6bdf4d59df2340 (diff) | |
download | dexon-fa187a366dda1894179635eeec2a929bfacc4ad3.tar.gz dexon-fa187a366dda1894179635eeec2a929bfacc4ad3.tar.zst dexon-fa187a366dda1894179635eeec2a929bfacc4ad3.zip |
Merge pull request #2035 from bas-vk/rcp-v2-rebase
rpc: new RPC implementation with pub/sub support
Diffstat (limited to 'node/node.go')
-rw-r--r-- | node/node.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/node/node.go b/node/node.go index 5566bc44b..d6debe123 100644 --- a/node/node.go +++ b/node/node.go @@ -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 +} |