aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/api.go')
-rw-r--r--rpc/api.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 8e3d3cc63..06014c74f 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -46,6 +46,13 @@ func NewEthereumApi(eth *xeth.XEth, dataDir string) *EthereumApi {
return api
}
+func (self *EthereumApi) xeth() *xeth.XEth {
+ self.xethMu.RLock()
+ defer self.xethMu.RUnlock()
+
+ return self.eth
+}
+
func (self *EthereumApi) xethWithStateNum(num int64) *xeth.XEth {
chain := self.xeth().Backend().ChainManager()
var block *types.Block
@@ -328,7 +335,7 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
return err
}
- v, err := p.GetBlockByHash(args.BlockHash, args.Transactions)
+ v, err := p.GetBlockByHash(args.BlockHash, args.IncludeTxs)
if err != nil {
return err
}
@@ -339,7 +346,7 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
return err
}
- v, err := p.GetBlockByNumber(args.BlockNumber, args.Transactions)
+ v, err := p.GetBlockByNumber(args.BlockNumber, args.IncludeTxs)
if err != nil {
return err
}
@@ -580,13 +587,6 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
return nil
}
-func (self *EthereumApi) xeth() *xeth.XEth {
- self.xethMu.RLock()
- defer self.xethMu.RUnlock()
-
- return self.eth
-}
-
func toFilterOptions(options *FilterOptions) *core.FilterOptions {
var opts core.FilterOptions