mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[wallet] Support creating a blank wallet
A blank wallet is a wallet that has no keys, script or watch only things. A new wallet flag indicating that it is blank will be set when the wallet is blank. Once it is no longer blank (a seed has been generated, keys or scripts imported, etc), the flag will be unset.
This commit is contained in:
@@ -580,12 +580,7 @@ bool WalletModel::privateKeysDisabled() const
|
||||
|
||||
bool WalletModel::canGetAddresses() const
|
||||
{
|
||||
// The wallet can provide a fresh address if:
|
||||
// * hdEnabled(): an HD seed is present; or
|
||||
// * it is a legacy wallet, because:
|
||||
// * !hdEnabled(): an HD seed is not present; and
|
||||
// * !IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS): private keys have not been disabled (which results in hdEnabled() == true)
|
||||
return m_wallet->hdEnabled() || (!m_wallet->hdEnabled() && !m_wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS));
|
||||
return m_wallet->canGetAddresses();
|
||||
}
|
||||
|
||||
QString WalletModel::getWalletName() const
|
||||
|
||||
Reference in New Issue
Block a user