Skip to content

Commit 5801db3

Browse files
Update wallet.go
1 parent 188f73e commit 5801db3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

accounts/usbwallet/wallet.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ func (w *wallet) selfDerive() {
343343
context = context.Background()
344344
nextAddrs = append([]common.Address{}, w.deriveNextAddrs...)
345345
)
346+
// Deep-copy derivation paths so updates inside this section don't mutate
347+
// w.deriveNextPaths while we only hold stateLock.RLock.
346348
nextPaths := make([]accounts.DerivationPath, len(w.deriveNextPaths))
347349
for i, path := range w.deriveNextPaths {
348350
nextPaths[i] = append(accounts.DerivationPath(nil), path...)

0 commit comments

Comments
 (0)