mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-11 10:36:37 +00:00
Check for error on DB fetch of tx
This commit is contained in:
parent
f7fdb4dfbe
commit
12f82ab2ff
1 changed files with 5 additions and 1 deletions
|
|
@ -318,7 +318,11 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
|
||||||
Index uint64
|
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)
|
r := bytes.NewReader(v)
|
||||||
err := rlp.Decode(r, &txExtra)
|
err := rlp.Decode(r, &txExtra)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue