aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index e35bce61ef..e54bbb3f45 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -977,6 +977,24 @@ bool CWallet::LoadWallet(bool& fFirstRunRet)
return true;
}
+
+bool CWallet::SetAddressBookName(const string& strAddress, const string& strName)
+{
+ mapAddressBook[strAddress] = strName;
+ if (!fFileBacked)
+ return false;
+ return CWalletDB(strWalletFile).WriteName(strAddress, strName);
+}
+
+bool CWallet::DelAddressBookName(const string& strAddress)
+{
+ mapAddressBook.erase(strAddress);
+ if (!fFileBacked)
+ return false;
+ return CWalletDB(strWalletFile).EraseName(strAddress);
+}
+
+
void CWallet::PrintWallet(const CBlock& block)
{
CRITICAL_BLOCK(cs_mapWallet)