From 81aaaf43084ca0b9473e7a85e6833301cba09c30 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Fri, 11 Mar 2016 23:07:21 +0300 Subject: [PATCH] Fix daemon compilation isue. --- src/init.cpp | 2 +- src/rpcwallet.cpp | 2 +- src/wallet.cpp | 5 +++++ src/wallet.h | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 2f237c0..417b342 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -900,7 +900,7 @@ bool AppInit2() if (!pwalletMain->GetKeyFromPool(newDefaultKey, false)) strErrors << _("Cannot initialize keypool") << "\n"; pwalletMain->SetDefaultKey(newDefaultKey); - if (!pwalletMain->SetAddressBookName(CBitcoinAddress(pwalletMain->vchDefaultKey.GetID()), "")) + if (!pwalletMain->SetAddressBookName(pwalletMain->vchDefaultKey.GetID(), "")) strErrors << _("Cannot write default address") << "\n"; } diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 61ee9e9..0d0946e 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -173,7 +173,7 @@ CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false) if (!pwalletMain->GetKeyFromPool(account.vchPubKey, false)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); - pwalletMain->SetAddressBookName(CBitcoinAddress(account.vchPubKey.GetID()), strAccount); + pwalletMain->SetAddressBookName(account.vchPubKey.GetID(), strAccount); walletdb.WriteAccount(strAccount, account); } diff --git a/src/wallet.cpp b/src/wallet.cpp index 8006674..b484ab6 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -2236,6 +2236,11 @@ DBErrors CWallet::ZapWalletTx() return DB_LOAD_OK; } +bool CWallet::SetAddressBookName(const CTxDestination& address, const string& strName) +{ + return SetAddressBookName(CBitcoinAddress(address), strName); +} + bool CWallet::SetAddressBookName(const CBitcoinAddress& address, const string& strName) { std::map::iterator mi = mapAddressBook.find(address); diff --git a/src/wallet.h b/src/wallet.h index b3d7d33..2dffd04 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -319,6 +319,8 @@ public: DBErrors ZapWalletTx(); + bool SetAddressBookName(const CTxDestination& address, const std::string& strName); + bool SetAddressBookName(const CBitcoinAddress& address, const std::string& strName); bool DelAddressBookName(const CBitcoinAddress& address); -- 1.7.1