Page MenuHomePhabricator

wallet: Add missing cs_wallet/cs_KeyStore locks to wallet
ClosedPublic

Authored by Fabien on Jan 24 2020, 15:47.

Details

Summary

Add missing wallet locks:

  • Calling the function GetConflicts(...) requires holding the mutex

cs_wallet

  • Calling the function IsSpent(...) requires holding the mutex

cs_wallet

  • Accessing the variables mapKeys and mapCryptedKeys requires holding

the mutex cs_KeyStore

  • Accessing the variable nTimeFirstKey requires holding the mutex

cs_wallet

  • Accessing the variable mapWallet requires holding the mutex cs_wallet
  • Accessing the variable nTimeFirstKey requires holding the mutex

cs_wallet

Backport of core PR11634.

Test Plan

With Clang as a compiler:

cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=ON
ninja check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jan 24 2020, 15:47
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 24 2020, 15:47
teamcity edited the summary of this revision. (Show Details)Jan 24 2020, 15:48

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

jasonbcox accepted this revision.Jan 24 2020, 18:40
This revision is now accepted and ready to land.Jan 24 2020, 18:40