aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 11:20:54 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 11:20:54 +0800
commit6669ef5b701f8b060287c8a63e9f3c1116b4b74a (patch)
treea669e6e774aaacc5edc8ee93dc2be259d4a690e5 /rpc/api.go
parent7b45f3377f3f8d911d7678530138a1249f523155 (diff)
downloadgo-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.tar
go-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.tar.gz
go-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.tar.bz2
go-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.tar.lz
go-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.tar.xz
go-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.tar.zst
go-tangerine-6669ef5b701f8b060287c8a63e9f3c1116b4b74a.zip
Rename for clarity
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