aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 08:06:35 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 08:06:35 +0800
commit57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d (patch)
treefafe6ed89d59245a485d3d71422f93130cf39e48 /rpc/api.go
parent6fef6168705a9e70f36560b100d276092ecb5bff (diff)
downloadgo-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.tar
go-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.tar.gz
go-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.tar.bz2
go-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.tar.lz
go-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.tar.xz
go-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.tar.zst
go-tangerine-57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d.zip
inline DbGet
Diffstat (limited to 'rpc/api.go')
-rw-r--r--rpc/api.go17
1 files changed, 6 insertions, 11 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 62b8199f1..e2a18528b 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -303,16 +303,6 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) e
return nil
}
-func (p *EthereumApi) DbGet(args *DbArgs, reply *interface{}) error {
- if err := args.requirements(); err != nil {
- return err
- }
-
- res, _ := p.db.Get([]byte(args.Database + args.Key))
- *reply = string(res)
- return nil
-}
-
func (p *EthereumApi) NewWhisperIdentity(reply *interface{}) error {
*reply = p.xeth().Whisper().NewIdentity()
return nil
@@ -713,7 +703,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
if err := json.Unmarshal(req.Params, &args); err != nil {
return err
}
- return p.DbGet(args, reply)
+ if err := args.requirements(); err != nil {
+ return err
+ }
+
+ res, _ := p.db.Get([]byte(args.Database + args.Key))
+ *reply = string(res)
case "db_putHex", "db_getHex":
return NewNotImplementedError(req.Method)
case "shh_post":