aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-12-17 20:34:39 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2018-01-03 05:42:57 -0800
commitcbe197470ecc1f7b48771c4e7b654ab030af4c9e (patch)
tree186ac9f061e40c2b891e154c6bc81bdd74bc4b03 /src/wallet/wallet.cpp
parent0c8ea6380c9f402ed9777fd015b117ba13125a35 (diff)
downloadbitcoin-cbe197470ecc1f7b48771c4e7b654ab030af4c9e.tar.xz
[refactor] GetAccount{PubKey,Address} -> GetAccountDestination
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 873a8d855e..f73f787259 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -821,7 +821,7 @@ bool CWallet::AccountMove(std::string strFrom, std::string strTo, CAmount nAmoun
return true;
}
-bool CWallet::GetAccountPubkey(CPubKey &pubKey, std::string strAccount, bool bForceNew)
+bool CWallet::GetAccountDestination(CTxDestination &dest, std::string strAccount, bool bForceNew)
{
CWalletDB walletdb(*dbw);
@@ -850,12 +850,13 @@ bool CWallet::GetAccountPubkey(CPubKey &pubKey, std::string strAccount, bool bFo
if (!GetKeyFromPool(account.vchPubKey, false))
return false;
- SetAddressBook(account.vchPubKey.GetID(), strAccount, "receive");
+ dest = account.vchPubKey.GetID();
+ SetAddressBook(dest, strAccount, "receive");
walletdb.WriteAccount(strAccount, account);
+ } else {
+ dest = account.vchPubKey.GetID();
}
- pubKey = account.vchPubKey;
-
return true;
}