mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Fix bad merge: getaccountaddress was broken for new accounts
This commit is contained in:
parent
36d9b2311d
commit
2f4c30fd85
@ -378,8 +378,6 @@ CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false)
|
|||||||
|
|
||||||
// Generate a new key
|
// Generate a new key
|
||||||
if (account.vchPubKey.empty() || bForceNew || bKeyUsed)
|
if (account.vchPubKey.empty() || bForceNew || bKeyUsed)
|
||||||
{
|
|
||||||
if (pwalletMain->GetKeyPoolSize() < 1)
|
|
||||||
{
|
{
|
||||||
if (!pwalletMain->GetKeyFromPool(account.vchPubKey, false))
|
if (!pwalletMain->GetKeyFromPool(account.vchPubKey, false))
|
||||||
throw JSONRPCError(-12, "Error: Keypool ran out, please call keypoolrefill first");
|
throw JSONRPCError(-12, "Error: Keypool ran out, please call keypoolrefill first");
|
||||||
@ -387,7 +385,6 @@ CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false)
|
|||||||
pwalletMain->SetAddressBookName(CBitcoinAddress(account.vchPubKey), strAccount);
|
pwalletMain->SetAddressBookName(CBitcoinAddress(account.vchPubKey), strAccount);
|
||||||
walletdb.WriteAccount(strAccount, account);
|
walletdb.WriteAccount(strAccount, account);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return CBitcoinAddress(account.vchPubKey);
|
return CBitcoinAddress(account.vchPubKey);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user