xeth: getTransactionByHash, try pool if db fails

pull/864/head
obscuren 10 years ago
parent dcfecebe1f
commit 60b5a94428
  1. 2
      xeth/xeth.go

@ -235,6 +235,8 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
data, _ := self.backend.ExtraDb().Get(common.FromHex(hash)) data, _ := self.backend.ExtraDb().Get(common.FromHex(hash))
if len(data) != 0 { if len(data) != 0 {
tx = types.NewTransactionFromBytes(data) tx = types.NewTransactionFromBytes(data)
} else { // check pending transactions
tx = self.backend.TxPool().GetTransaction(common.HexToHash(hash))
} }
// meta // meta

Loading…
Cancel
Save