mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[refactor] GetAccount{PubKey,Address} -> GetAccountDestination
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user