aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-04-12 20:03:21 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-04-12 20:03:21 +0800
commit8627680e24a29abd5f2aaaeaa2c1c852d8fb693b (patch)
tree1ad39e8b43d04e5a17c17c0b7314eece80620dd5 /eth/backend.go
parent934f587bd5c38a36e8b8c8647a9e600d1751ff2f (diff)
parentaa9fff3e68b1def0a9a22009c233150bf9ba481f (diff)
downloaddexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.tar
dexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.tar.gz
dexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.tar.bz2
dexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.tar.lz
dexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.tar.xz
dexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.tar.zst
dexon-8627680e24a29abd5f2aaaeaa2c1c852d8fb693b.zip
Merge pull request #2359 from bas-vk/rpc-optional-args
rpc: several fixes and support for optional arguments
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 20f516610..f4282d59f 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -272,11 +272,14 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
// APIs returns the collection of RPC services the ethereum package offers.
// NOTE, some of these services probably need to be moved to somewhere else.
func (s *Ethereum) APIs() []rpc.API {
+ // share gas price oracle in API's
+ gpo := NewGasPriceOracle(s)
+
return []rpc.API{
{
Namespace: "eth",
Version: "1.0",
- Service: NewPublicEthereumAPI(s),
+ Service: NewPublicEthereumAPI(s, gpo),
Public: true,
}, {
Namespace: "eth",
@@ -291,12 +294,12 @@ func (s *Ethereum) APIs() []rpc.API {
}, {
Namespace: "eth",
Version: "1.0",
- Service: NewPublicBlockChainAPI(s.chainConfig, s.BlockChain(), s.Miner(), s.ChainDb(), s.EventMux(), s.AccountManager()),
+ Service: NewPublicBlockChainAPI(s.chainConfig, s.BlockChain(), s.Miner(), s.ChainDb(), gpo, s.EventMux(), s.AccountManager()),
Public: true,
}, {
Namespace: "eth",
Version: "1.0",
- Service: NewPublicTransactionPoolAPI(s),
+ Service: NewPublicTransactionPoolAPI(s, gpo),
Public: true,
}, {
Namespace: "eth",