Skip to content

Commit 43bf82c

Browse files
ianyysung1123
authored andcommitted
eth: modify GetBlockReceipts to identical too GetTransactionReceipt
1 parent c4b52ef commit 43bf82c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

eth/api_debug.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,7 @@ func (api *DebugAPI) GetTransferLogs(ctx context.Context, hash common.Hash) ([]*
539539
}
540540

541541
// GetBlockReceipts returns all transaction receipts of the specified block.
542-
func (api *DebugAPI) GetBlockReceipts(blockHash common.Hash) (types.Receipts, error) {
543-
if receipts := api.eth.blockchain.GetReceiptsByHash(blockHash); receipts != nil {
544-
return receipts, nil
545-
}
546-
return nil, errors.New("unknown receipts")
542+
func (api *DebugAPI) GetBlockReceipts(ctx context.Context, blockHash common.Hash) ([]map[string]interface{}, error) {
543+
bc := ethapi.NewBlockChainAPI(api.eth.APIBackend)
544+
return bc.GetBlockReceipts(ctx, rpc.BlockNumberOrHashWithHash(blockHash, true))
547545
}

0 commit comments

Comments
 (0)