Skip to content

Commit 91f3f1a

Browse files
committed
Merge branch 'deadlock'
2 parents 7b52130 + 8136352 commit 91f3f1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/backend.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,13 +910,14 @@ func (backend *Backend) SetWatchonly(watchonly bool) error {
910910
nil,
911911
)
912912
}
913+
914+
accounts := accountsList(backend.Accounts())
913915
// When enabling watchonly, we turn the currently loaded accounts into watch-only accounts.
914916
t := true
915917
return backend.AccountSetWatch(
916918
func(account *config.Account) bool {
917919
// Apply to each currently loaded account.
918-
defer backend.accountsAndKeystoreLock.RLock()()
919-
return backend.accounts.lookup(account.Code) != nil
920+
return accounts.lookup(account.Code) != nil
920921
},
921922
&t,
922923
)

0 commit comments

Comments
 (0)