Output scripts aren't needed in GetAffectedKeys, this change avoids computing them.
Based on #14821.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
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.
409 | @@ -410,8 +410,8 @@ class ComboDescriptor final : public Descriptor 410 | CScriptID p2wpkh_id(p2wpkh); 411 | CScript p2sh_p2wpkh = GetScriptForDestination(p2wpkh_id); 412 | out.scripts.emplace(p2wpkh_id, p2wpkh); 413 | - output_scripts.push_back(std::move(p2wpkh)); 414 | - output_scripts.push_back(std::move(p2sh_p2wpkh)); 415 | + if (output_scripts) output_scripts->push_back(std::move(p2wpkh)); 416 | + if (output_scripts) output_scripts->push_back(std::move(p2sh_p2wpkh));
Combine the two if statements :-)
159 | - { 160 | - CKeyID id(keyid); 161 | - if (keystore.HaveKey(id)) { 162 | - vKeys.push_back(id); 163 | - } 164 | +std::vector<CKeyID> GetAffectedKeys(const CScript& spk, const SigningProvider& provider)
nit: could be static
#14821 (review) ;P
Concept ACK
<!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase