Skip to content

Commit 007bced

Browse files
committed
Merge pull request #982 from tgerring/issue962
Check for error on DB fetch of tx
2 parents 6bc8dec + 12f82ab commit 007bced

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xeth/xeth.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,11 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
318318
Index uint64
319319
}
320320

321-
v, _ := self.backend.ExtraDb().Get(append(common.FromHex(hash), 0x0001))
321+
v, dberr := self.backend.ExtraDb().Get(append(common.FromHex(hash), 0x0001))
322+
// TODO check specifically for ErrNotFound
323+
if dberr != nil {
324+
return
325+
}
322326
r := bytes.NewReader(v)
323327
err := rlp.Decode(r, &txExtra)
324328
if err == nil {

0 commit comments

Comments
 (0)