mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
turbo/jsonrpc: eth_getBlockReceipts support by by hash (#7886)
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
035a6f867c
commit
dec2f5a3b3
@ -58,7 +58,7 @@ type EthAPI interface {
|
||||
// Receipt related (see ./eth_receipts.go)
|
||||
GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
|
||||
GetLogs(ctx context.Context, crit ethFilters.FilterCriteria) (types.Logs, error)
|
||||
GetBlockReceipts(ctx context.Context, number rpc.BlockNumber) ([]map[string]interface{}, error)
|
||||
GetBlockReceipts(ctx context.Context, numberOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
|
||||
|
||||
// Uncle related (see ./eth_uncles.go)
|
||||
GetUncleByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error)
|
||||
|
@ -667,15 +667,14 @@ func (api *APIImpl) GetTransactionReceipt(ctx context.Context, txnHash common.Ha
|
||||
}
|
||||
|
||||
// GetBlockReceipts - receipts for individual block
|
||||
// func (api *APIImpl) GetBlockReceipts(ctx context.Context, number rpc.BlockNumber) ([]map[string]interface{}, error) {
|
||||
func (api *APIImpl) GetBlockReceipts(ctx context.Context, number rpc.BlockNumber) ([]map[string]interface{}, error) {
|
||||
func (api *APIImpl) GetBlockReceipts(ctx context.Context, numberOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error) {
|
||||
tx, err := api.db.BeginRo(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer tx.Rollback()
|
||||
|
||||
blockNum, blockHash, _, err := rpchelper.GetBlockNumber(rpc.BlockNumberOrHashWithNumber(number), tx, api.filters)
|
||||
blockNum, blockHash, _, err := rpchelper.GetBlockNumber(numberOrHash, tx, api.filters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user