Cleanup: Add braces for clarity

This commit is contained in:
Jack Grigg
2017-12-20 11:18:59 +00:00
parent 7b8d4f87ec
commit bec2235148
2 changed files with 16 additions and 8 deletions

View File

@@ -252,22 +252,27 @@ bool CWallet::LoadZKey(const libzcash::SpendingKey &key)
bool CWallet::AddViewingKey(const libzcash::ViewingKey &vk)
{
if (!CCryptoKeyStore::AddViewingKey(vk))
if (!CCryptoKeyStore::AddViewingKey(vk)) {
return false;
}
nTimeFirstKey = 1; // No birthday information for viewing keys.
if (!fFileBacked)
if (!fFileBacked) {
return true;
}
return CWalletDB(strWalletFile).WriteViewingKey(vk);
}
bool CWallet::RemoveViewingKey(const libzcash::ViewingKey &vk)
{
AssertLockHeld(cs_wallet);
if (!CCryptoKeyStore::RemoveViewingKey(vk))
if (!CCryptoKeyStore::RemoveViewingKey(vk)) {
return false;
if (fFileBacked)
if (!CWalletDB(strWalletFile).EraseViewingKey(vk))
}
if (fFileBacked) {
if (!CWalletDB(strWalletFile).EraseViewingKey(vk)) {
return false;
}
}
return true;
}