Skip to content

Commit 78a0979

Browse files
committed
refactor: drop useless check that string is longer than 5 chars
It's already checked by find()
1 parent 1038ad3 commit 78a0979

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/rpc/backup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,8 +2039,8 @@ RPCHelpMan listdescriptors()
20392039
spk.pushKV("internal", wallet->GetScriptPubKeyMan(true) == desc_spk_man);
20402040
}
20412041
if (type != std::nullopt) {
2042-
std::string match = strprintf("/9'/%s'/0'", Params().ExtCoinType());
2043-
bool is_cj = descriptor.size() > 5 && descriptor.find(match) != std::string::npos;
2042+
std::string match = strprintf("/%d'/%s'/0'", BIP32_PURPOSE_FEATURE, Params().ExtCoinType());
2043+
bool is_cj = descriptor.find(match) != std::string::npos;
20442044
if (is_cj) {
20452045
spk.pushKV("internal", false);
20462046
spk.pushKV("coinjoin", is_cj);

0 commit comments

Comments
 (0)