diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-05-20 01:53:24 -0700 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-05-20 01:53:24 -0700 |
| commit | 5a8398e55a5f2bc0ce95c1e5da06c11365af0764 (patch) | |
| tree | 4ad01e70d94768977f25a0129255ec3c84635f2e /src/keystore.cpp | |
| parent | Merge pull request #1323 from Diapolo/string_fixes (diff) | |
| parent | Make testcases build, prevent windows symbol collision (diff) | |
| download | discoin-5a8398e55a5f2bc0ce95c1e5da06c11365af0764.tar.xz discoin-5a8398e55a5f2bc0ce95c1e5da06c11365af0764.zip | |
Merge pull request #1205 from laanwj/2012_05_granular_ui_notifications
Finer-grained UI updates, move UI interface to boost::signals
Diffstat (limited to 'src/keystore.cpp')
| -rw-r--r-- | src/keystore.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp index 313518711..bdeae3013 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -73,6 +73,20 @@ bool CCryptoKeyStore::SetCrypted() return true; } +bool CCryptoKeyStore::Lock() +{ + if (!SetCrypted()) + return false; + + { + LOCK(cs_KeyStore); + vMasterKey.clear(); + } + + NotifyStatusChanged(this); + return true; +} + bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) { { @@ -99,6 +113,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) } vMasterKey = vMasterKeyIn; } + NotifyStatusChanged(this); return true; } |