wallet: Add missing cs_wallet/cs_KeyStore locks to wallet
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
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D5063