Update wallet.go

This commit is contained in:
Alvarez 2025-11-26 23:23:20 +01:00
parent a8d26b2e92
commit f4d3df62aa

View file

@ -343,6 +343,8 @@ func (w *wallet) selfDerive() {
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...)