mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
refactor: simplify implementation of function CWallet::IsLocked
This commit is contained in:
parent
685cf34cb9
commit
c944908399
@ -5459,21 +5459,11 @@ bool CWallet::IsLocked(bool fForMixing) const
|
|||||||
{
|
{
|
||||||
if (!IsCrypted())
|
if (!IsCrypted())
|
||||||
return false;
|
return false;
|
||||||
bool result;
|
|
||||||
{
|
|
||||||
LOCK(cs_wallet);
|
|
||||||
result = vMasterKey.empty();
|
|
||||||
}
|
|
||||||
// fForMixing fOnlyMixingAllowed return
|
|
||||||
// ---------------------------------------
|
|
||||||
// true true result
|
|
||||||
// true false result
|
|
||||||
// false true true
|
|
||||||
// false false result
|
|
||||||
|
|
||||||
if(!fForMixing && fOnlyMixingAllowed) return true;
|
if(!fForMixing && fOnlyMixingAllowed) return true;
|
||||||
|
|
||||||
return result;
|
LOCK(cs_wallet);
|
||||||
|
return vMasterKey.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWallet::Lock(bool fAllowMixing)
|
bool CWallet::Lock(bool fAllowMixing)
|
||||||
|
Loading…
Reference in New Issue
Block a user