aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-04-23 17:22:35 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-04-23 17:22:35 +0800
commit67cc80ba6647f9e316b43d869a05856435f7b444 (patch)
tree34a3112efcc718178b2a18379db1cc5bfb7c1067 /rpc/api.go
parent8eefcb8493b4c45b5d609da6ed5cac9463770885 (diff)
parent73b3f2837ff652533ca7a5c09cce4d37e13a852e (diff)
downloaddexon-67cc80ba6647f9e316b43d869a05856435f7b444.tar.gz
dexon-67cc80ba6647f9e316b43d869a05856435f7b444.tar.zst
dexon-67cc80ba6647f9e316b43d869a05856435f7b444.zip
Merge pull request #786 from tgerring/issue739
Empty Call response should return 0x instead of 0x00. Closes #739
Diffstat (limited to 'rpc/api.go')
-rw-r--r--rpc/api.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 6b9c398ec..085d8cf27 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -189,7 +189,11 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
// TODO unwrap the parent method's ToHex call
- *reply = newHexData(common.FromHex(v))
+ if v == "0x0" {
+ *reply = newHexData([]byte{})
+ } else {
+ *reply = newHexData(common.FromHex(v))
+ }
case "eth_flush":
return NewNotImplementedError(req.Method)
case "eth_getBlockByHash":