diff --git a/accounts/usbwallet/wallet.go b/accounts/usbwallet/wallet.go index f1597ca1a702..3fc121c773c7 100644 --- a/accounts/usbwallet/wallet.go +++ b/accounts/usbwallet/wallet.go @@ -338,14 +338,17 @@ func (w *wallet) selfDerive() { } // Device lock obtained, derive the next batch of accounts var ( - accs []accounts.Account - paths []accounts.DerivationPath - - nextPaths = append([]accounts.DerivationPath{}, w.deriveNextPaths...) - nextAddrs = append([]common.Address{}, w.deriveNextAddrs...) - + accs []accounts.Account + paths []accounts.DerivationPath context = context.Background() + nextAddrs = append([]common.Address{}, w.deriveNextAddrs...) ) + // Deep-copy derivation paths so updates inside this section don't mutate + // w.deriveNextPaths while we only hold stateLock.RLock. + nextPaths := make([]accounts.DerivationPath, len(w.deriveNextPaths)) + for i, path := range w.deriveNextPaths { + nextPaths[i] = append(accounts.DerivationPath(nil), path...) + } for i := 0; i < len(nextAddrs); i++ { for empty := false; !empty; { // Retrieve the next derived Ethereum account diff --git a/beacon/params/config_test.go b/beacon/params/config_test.go index 0b569b604c5b..41e120469be5 100644 --- a/beacon/params/config_test.go +++ b/beacon/params/config_test.go @@ -15,9 +15,6 @@ ALTAIR_FORK_EPOCH: 1 EIP7928_FORK_VERSION: 0xb0000038 EIP7928_FORK_EPOCH: 18446744073709551615 -EIP7XXX_FORK_VERSION: -EIP7XXX_FORK_EPOCH: - BLOB_SCHEDULE: [] ` c := &ChainConfig{}