aboutsummaryrefslogtreecommitdiffstats
path: root/eth/api_backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/api_backend.go')
-rw-r--r--eth/api_backend.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/eth/api_backend.go b/eth/api_backend.go
index 03f6012d7..8748d444f 100644
--- a/eth/api_backend.go
+++ b/eth/api_backend.go
@@ -25,7 +25,6 @@ import (
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/bloombits"
- "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
@@ -107,18 +106,11 @@ func (b *EthAPIBackend) GetBlock(ctx context.Context, hash common.Hash) (*types.
}
func (b *EthAPIBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error) {
- if number := rawdb.ReadHeaderNumber(b.eth.chainDb, hash); number != nil {
- return rawdb.ReadReceipts(b.eth.chainDb, hash, *number), nil
- }
- return nil, nil
+ return b.eth.blockchain.GetReceiptsByHash(hash), nil
}
func (b *EthAPIBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error) {
- number := rawdb.ReadHeaderNumber(b.eth.chainDb, hash)
- if number == nil {
- return nil, nil
- }
- receipts := rawdb.ReadReceipts(b.eth.chainDb, hash, *number)
+ receipts := b.eth.blockchain.GetReceiptsByHash(hash)
if receipts == nil {
return nil, nil
}