mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
Update wallet.go
This commit is contained in:
parent
a8d26b2e92
commit
f4d3df62aa
1 changed files with 2 additions and 0 deletions
|
|
@ -343,6 +343,8 @@ func (w *wallet) selfDerive() {
|
||||||
context = context.Background()
|
context = context.Background()
|
||||||
nextAddrs = append([]common.Address{}, w.deriveNextAddrs...)
|
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))
|
nextPaths := make([]accounts.DerivationPath, len(w.deriveNextPaths))
|
||||||
for i, path := range w.deriveNextPaths {
|
for i, path := range w.deriveNextPaths {
|
||||||
nextPaths[i] = append(accounts.DerivationPath(nil), path...)
|
nextPaths[i] = append(accounts.DerivationPath(nil), path...)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue