Currently anything imported with internal
will not be treated as change since checking the address book is a primary test of this.
Added basic tests of all combinations of arguments and change identification.
Currently anything imported with internal
will not be treated as change since checking the address book is a primary test of this.
Added basic tests of all combinations of arguments and change identification.
This seems to be a bug that has existed since importmulti
was introduced?
I guess few people import change addresses.
Yes, it’s been here since the introduction I believe.
With my hww setup I use PSBTs which have no notion of IsChange
, so I’ve never run into it. Only realized this by reviewing your other PR.
993@@ -994,8 +994,8 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con
994 throw JSONRPCError(RPC_WALLET_ERROR, "Error adding scriptPubKey script to wallet");
995 }
996
997- // add to address book or update label
998- if (IsValidDestination(scriptpubkey_dest)) {
999+ // if not internal add to address book or update label
1000+ if (!internal && IsValidDestination(scriptpubkey_dest)) {
I think this could just be:
0if (!internal) {
1 assert(IsValidDestination(scriptpubkey_dest));
2 ...
3}
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
fanquake added the Needs backport label a day ago @fanquake Backport to what branch?