Merge pull request #5802 from nuttycom/bug/z_listaddress_internal
Do not display internal addresses in z_listaddresses.
This commit is contained in:
commit
8e15446c17
|
@ -55,6 +55,10 @@ class WalletAccountsTest(BitcoinTestFramework):
|
|||
account0 = self.nodes[0].z_getnewaccount()
|
||||
assert_equal(account0['account'], 0)
|
||||
|
||||
# Verify that just creating the account does not generate any visible addresses
|
||||
addresses = self.nodes[0].z_listaddresses()
|
||||
assert_equal([], addresses)
|
||||
|
||||
# The next account will be 1.
|
||||
account1 = self.nodes[0].z_getnewaccount()
|
||||
assert_equal(account1['account'], 1)
|
||||
|
|
|
@ -3491,7 +3491,8 @@ UniValue z_listaddresses(const UniValue& params, bool fHelp)
|
|||
pwalletMain->GetSaplingPaymentAddresses(addresses);
|
||||
for (auto addr : addresses) {
|
||||
// Don't show Sapling receivers that are part of an account in the wallet.
|
||||
if (pwalletMain->FindUnifiedAddressByReceiver(addr).has_value()) {
|
||||
if (pwalletMain->FindUnifiedAddressByReceiver(addr).has_value()
|
||||
|| pwalletMain->IsInternalRecipient(addr)) {
|
||||
continue;
|
||||
}
|
||||
if (fIncludeWatchonly || pwalletMain->HaveSaplingSpendingKeyForAddress(addr)) {
|
||||
|
|
Loading…
Reference in New Issue