mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-09-13 14:09:46 +00:00
Merge pull request #773 from guggero/account-info-lock-fix
waddrmgr: fix concurrent map access
This commit is contained in:
commit
9043c19d87
1 changed files with 2 additions and 2 deletions
|
@ -518,8 +518,8 @@ func (s *ScopedKeyManager) loadAccountInfo(ns walletdb.ReadBucket,
|
||||||
func (s *ScopedKeyManager) AccountProperties(ns walletdb.ReadBucket,
|
func (s *ScopedKeyManager) AccountProperties(ns walletdb.ReadBucket,
|
||||||
account uint32) (*AccountProperties, error) {
|
account uint32) (*AccountProperties, error) {
|
||||||
|
|
||||||
defer s.mtx.RUnlock()
|
s.mtx.Lock()
|
||||||
s.mtx.RLock()
|
defer s.mtx.Unlock()
|
||||||
|
|
||||||
props := &AccountProperties{
|
props := &AccountProperties{
|
||||||
AccountNumber: account,
|
AccountNumber: account,
|
||||||
|
|
Loading…
Add table
Reference in a new issue