Commit 60b5a944 authored by obscuren's avatar obscuren

xeth: getTransactionByHash, try pool if db fails

parent dcfecebe
......@@ -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
......
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