MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Lock

Method Lock

src/wallet/wallet.cpp:3390–3405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3388}
3389
3390bool CWallet::Lock()
3391{
3392 if (!HasEncryptionKeys())
3393 return false;
3394
3395 {
3396 LOCK2(m_relock_mutex, cs_wallet);
3397 if (!vMasterKey.empty()) {
3398 memory_cleanse(vMasterKey.data(), vMasterKey.size() * sizeof(decltype(vMasterKey)::value_type));
3399 vMasterKey.clear();
3400 }
3401 }
3402
3403 NotifyStatusChanged(this);
3404 return true;
3405}
3406
3407bool CWallet::Unlock(const CKeyingMaterial& vMasterKeyIn)
3408{

Callers 15

setup_nodesMethod · 0.80
__init__Method · 0.80
p2p.pyFile · 0.80
__init__Method · 0.80
lockMethod · 0.80
walletpassphraseFunction · 0.80
walletlockFunction · 0.80
RunBenchmarkMethod · 0.80
LOCKS_EXCLUDEDMethod · 0.80
ScheduleMethod · 0.80
BackgroundThreadMainMethod · 0.80
EXCLUSIVE_LOCK_FUNCTIONFunction · 0.80

Calls 5

memory_cleanseFunction · 0.85
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by 3

ThreadBodyFunction · 0.64
LOCKS_EXCLUDEDMethod · 0.64