From c1dd16f4cef7aea9cc16b2826702dc72be8d53cb Mon Sep 17 00:00:00 2001 From: b1ackd0t Date: Tue, 15 Feb 2022 12:44:22 +0300 Subject: [PATCH] internal/ethapi: fix incorrect type on empty slice (#24372) * Fixes #24368 Signed-off-by: 0x6f736f646f * Update internal/ethapi/api.go Co-authored-by: Martin Holst Swende --- internal/ethapi/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 58fa32634..cf2108fcd 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -293,7 +293,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() } @@ -1967,7 +1967,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionDataAndReceipt(ctx context.Cont 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{}) {