aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 7de3e31be..3772146de 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -350,6 +350,24 @@ func (self *XEth) CurrentBlock() *types.Block {
return self.backend.ChainManager().CurrentBlock()
}
+func (self *XEth) GetBlockReceipts(bhash common.Hash) (receipts types.Receipts, err error) {
+ return self.backend.BlockProcessor().GetBlockReceipts(bhash)
+}
+
+func (self *XEth) GetTxReceipt(txhash common.Hash) (receipt *types.Receipt, err error) {
+ _, bhash, _, txi := self.EthTransactionByHash(common.ToHex(txhash[:]))
+ var receipts types.Receipts
+ receipts, err = self.backend.BlockProcessor().GetBlockReceipts(bhash)
+ if err == nil {
+ if txi < uint64(len(receipts)) {
+ receipt = receipts[txi]
+ } else {
+ err = fmt.Errorf("Invalid tx index")
+ }
+ }
+ return
+}
+
func (self *XEth) GasLimit() *big.Int {
return self.backend.ChainManager().GasLimit()
}