diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-15 01:37:30 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-15 01:37:30 +0800 |
commit | 007bced276128213c4c8048b90da2ced3816f32b (patch) | |
tree | 2dbd41177a823a7bed0d6778b5a81d95df3cccbb | |
parent | 6bc8dec7aceba4630e5e8c18376da2ceb46b2d5e (diff) | |
parent | 12f82ab2ff71e1d93610a40cf206f3e3d3faa70d (diff) | |
download | dexon-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.go | 6 |
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 { |