Skip to content

Commit 60b5a94

Browse files
committed
xeth: getTransactionByHash, try pool if db fails
1 parent dcfeceb commit 60b5a94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

xeth/xeth.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
235235
data, _ := self.backend.ExtraDb().Get(common.FromHex(hash))
236236
if len(data) != 0 {
237237
tx = types.NewTransactionFromBytes(data)
238+
} else { // check pending transactions
239+
tx = self.backend.TxPool().GetTransaction(common.HexToHash(hash))
238240
}
239241

240242
// meta

0 commit comments

Comments
 (0)