aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-04 08:50:46 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-04 08:50:46 +0800
commit6f69b4d61f1278ea2d9351667512a1202403eaff (patch)
treecdaba096d74e5fb7e0a1023708b4458d5cb7da37 /xeth/xeth.go
parentefd7da0ce8fc9ac10c2d50ed222c5360c53c17ca (diff)
parent2feb23c1dacf1cc7ef664d92f28b63dd46502f21 (diff)
downloadgo-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.tar
go-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.gz
go-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.bz2
go-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.lz
go-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.xz
go-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.zst
go-tangerine-6f69b4d61f1278ea2d9351667512a1202403eaff.zip
Merge pull request #1399 from obscuren/receipts-storing-fix
core, eth, miner, xeth: receipt storage fix
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 155ff3eea..cbc8dbbde 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -364,22 +364,12 @@ func (self *XEth) CurrentBlock() *types.Block {
return self.backend.ChainManager().CurrentBlock()
}
-func (self *XEth) GetBlockReceipts(bhash common.Hash) (receipts types.Receipts, err error) {
+func (self *XEth) GetBlockReceipts(bhash common.Hash) types.Receipts {
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) GetTxReceipt(txhash common.Hash) *types.Receipt {
+ return core.GetReceipt(self.backend.ExtraDb(), txhash)
}
func (self *XEth) GasLimit() *big.Int {