Skip to content

Commit

Permalink
Check for error on DB fetch of tx
Browse files Browse the repository at this point in the history
  • Loading branch information
tgerring committed May 14, 2015
1 parent f7fdb4d commit 12f82ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xeth/xeth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 12f82ab

Please sign in to comment.