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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[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.

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