aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-08 00:23:24 +0800
committerobscuren <geffobscura@gmail.com>2015-05-08 00:23:24 +0800
commit60b5a94428abf57dc921347684508db44f0f1a04 (patch)
tree4b68029e816f303f6ea840c3faee55225e69233b /xeth
parentdcfecebe1fbd977e4c6bd95e2ba14dd4d26f9532 (diff)
downloadgo-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.tar
go-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.tar.gz
go-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.tar.bz2
go-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.tar.lz
go-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.tar.xz
go-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.tar.zst
go-tangerine-60b5a94428abf57dc921347684508db44f0f1a04.zip
xeth: getTransactionByHash, try pool if db fails
Diffstat (limited to 'xeth')
-rw-r--r--xeth/xeth.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 90f709aea..e5f068fd1 100644
--- a/xeth/xeth.go
+++ b/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))
if len(data) != 0 {
tx = types.NewTransactionFromBytes(data)
+ } else { // check pending transactions
+ tx = self.backend.TxPool().GetTransaction(common.HexToHash(hash))
}
// meta