diff options
author | Bas van Kervel <bas@ethdev.com> | 2016-03-14 16:38:54 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2016-04-12 17:02:39 +0800 |
commit | aa9fff3e68b1def0a9a22009c233150bf9ba481f (patch) | |
tree | 926c241574d6d80dfe4ffd6d2e447a9f7f84dc8b /eth/backend.go | |
parent | 7e02105672cda92889a78db864a5701d78f45eb2 (diff) | |
download | dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.gz dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.bz2 dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.lz dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.xz dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.zst dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.zip |
rpc: various fixes/enhancements
rpc: be less restrictive on the request id
rpc: improved documentation
console: upgrade web3.js to version 0.16.0
rpc: cache http connections
rpc: rename wsDomains parameter to wsOrigins
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 9 |
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", |