From 849366bea40526fbd5580d3e3212731b6e27fa62 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 10 Jan 2025 14:15:04 +0100 Subject: [PATCH] Update chain.go --- cmd/devp2p/internal/ethtest/chain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/devp2p/internal/ethtest/chain.go b/cmd/devp2p/internal/ethtest/chain.go index 45d0b6c7c4..56f94ce3a0 100644 --- a/cmd/devp2p/internal/ethtest/chain.go +++ b/cmd/devp2p/internal/ethtest/chain.go @@ -40,6 +40,7 @@ import ( "github.com/ethereum/go-ethereum/eth/protocols/eth" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" + "golang.org/x/exp/maps" ) // Chain is a lightweight blockchain-like store which can read a hivechain @@ -165,7 +166,7 @@ func (c *Chain) RootAt(height int) common.Hash { // GetSender returns the address associated with account at the index in the // pre-funded accounts list. func (c *Chain) GetSender(idx int) (common.Address, uint64) { - accounts := slices.Clone(c.senders) + accounts := maps.Keys(c.senders) slices.SortFunc(accounts, commmon.Address.Cmp) addr := accounts[idx] return addr, c.senders[addr].Nonce