aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/geth/js_test.go2
-rw-r--r--rpc/api.go1
-rw-r--r--xeth/xeth.go6
3 files changed, 7 insertions, 2 deletions
diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go
index c2a0e2fe2..e02e8f704 100644
--- a/cmd/geth/js_test.go
+++ b/cmd/geth/js_test.go
@@ -68,7 +68,7 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) {
// set up mock genesis with balance on the testAddress
core.GenesisData = []byte(testGenesis)
- ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore"))
+ ks := crypto.NewKeyStorePlain(filepath.Join(tmp, "keystore"))
am := accounts.NewManager(ks)
ethereum, err := eth.New(&eth.Config{
DataDir: tmp,
diff --git a/rpc/api.go b/rpc/api.go
index 066c81222..b59253ef7 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -349,6 +349,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
if err != nil {
return err
}
+ contract.Code = newHexData(contract.Code).String()
*reply = contract
case "eth_newFilter":
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 0fe68d175..0d16393c2 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -318,7 +318,11 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
Index uint64
}
- v, _ := self.backend.ExtraDb().Get(append(common.FromHex(hash), 0x0001))
+ v, dberr := self.backend.ExtraDb().Get(append(common.FromHex(hash), 0x0001))
+ // TODO check specifically for ErrNotFound
+ if dberr != nil {
+ return
+ }
r := bytes.NewReader(v)
err := rlp.Decode(r, &txExtra)
if err == nil {