From 14c8d051e9e7adb2ec5ac1dbdc4e84033231de4c Mon Sep 17 00:00:00 2001 From: 0x6f736f646f Date: Fri, 11 Feb 2022 09:29:34 +0300 Subject: [PATCH 1/2] Fixes #24368 Signed-off-by: 0x6f736f646f --- internal/ethapi/api.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 04e63f38ea929..beb41de159d28 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -88,6 +88,7 @@ type feeHistoryResult struct { GasUsedRatio []float64 `json:"gasUsedRatio"` } +// FeeHistory function func (s *PublicEthereumAPI) FeeHistory(ctx context.Context, blockCount rpc.DecimalOrHex, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*feeHistoryResult, error) { oldest, reward, baseFee, gasUsed, err := s.b.FeeHistory(ctx, int(blockCount), lastBlock, rewardPercentiles) if err != nil { @@ -287,7 +288,7 @@ func NewPrivateAccountAPI(b Backend, nonceLock *AddrLocker) *PrivateAccountAPI { } } -// listAccounts will return a list of addresses for accounts this node manages. +// ListAccounts will return a list of addresses for accounts this node manages. func (s *PrivateAccountAPI) ListAccounts() []common.Address { return s.am.Accounts() } @@ -1656,7 +1657,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha fields["status"] = hexutil.Uint(receipt.Status) } if receipt.Logs == nil { - fields["logs"] = [][]*types.Log{} + fields["logs"] = []*types.Log{} } // If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation if receipt.ContractAddress != (common.Address{}) { From a9f7e3c7b09800041d77e4f80667b6b9689075b7 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 15 Feb 2022 10:42:47 +0100 Subject: [PATCH 2/2] Update internal/ethapi/api.go --- internal/ethapi/api.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index beb41de159d28..366d5714175d5 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -88,7 +88,6 @@ type feeHistoryResult struct { GasUsedRatio []float64 `json:"gasUsedRatio"` } -// FeeHistory function func (s *PublicEthereumAPI) FeeHistory(ctx context.Context, blockCount rpc.DecimalOrHex, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*feeHistoryResult, error) { oldest, reward, baseFee, gasUsed, err := s.b.FeeHistory(ctx, int(blockCount), lastBlock, rewardPercentiles) if err != nil {