Commit 12f82ab2 authored by Taylor Gerring's avatar Taylor Gerring

Check for error on DB fetch of tx

parent f7fdb4df
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment