aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-15 01:37:30 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-15 01:37:30 +0800
commit007bced276128213c4c8048b90da2ced3816f32b (patch)
tree2dbd41177a823a7bed0d6778b5a81d95df3cccbb
parent6bc8dec7aceba4630e5e8c18376da2ceb46b2d5e (diff)
parent12f82ab2ff71e1d93610a40cf206f3e3d3faa70d (diff)
downloaddexon-007bced276128213c4c8048b90da2ced3816f32b.tar
dexon-007bced276128213c4c8048b90da2ced3816f32b.tar.gz
dexon-007bced276128213c4c8048b90da2ced3816f32b.tar.bz2
dexon-007bced276128213c4c8048b90da2ced3816f32b.tar.lz
dexon-007bced276128213c4c8048b90da2ced3816f32b.tar.xz
dexon-007bced276128213c4c8048b90da2ced3816f32b.tar.zst
dexon-007bced276128213c4c8048b90da2ced3816f32b.zip
Merge pull request #982 from tgerring/issue962
Check for error on DB fetch of tx
-rw-r--r--xeth/xeth.go6
1 files changed, 5 insertions, 1 deletions
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 {