mirror of
https://github.com/status-im/op-geth.git
synced 2025-01-14 00:34:42 +00:00
xeth: getTransactionByHash, try pool if db fails
This commit is contained in:
parent
dcfecebe1f
commit
60b5a94428
@ -235,6 +235,8 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
|
||||
data, _ := self.backend.ExtraDb().Get(common.FromHex(hash))
|
||||
if len(data) != 0 {
|
||||
tx = types.NewTransactionFromBytes(data)
|
||||
} else { // check pending transactions
|
||||
tx = self.backend.TxPool().GetTransaction(common.HexToHash(hash))
|
||||
}
|
||||
|
||||
// meta
|
||||
|
Loading…
x
Reference in New Issue
Block a user