outputtype: remove redundant check for uncompressed keys in AddAndGetDestinationForScript

It's already checked by its (only) caller, AddAndGetMultisigDestination.
This commit is contained in:
Antoine Poinsot 2022-07-20 10:31:41 +02:00
parent b1a2021f78
commit c232ef20c0
No known key found for this signature in database
GPG key ID: E13FC145CD3F4304

View file

@ -91,8 +91,6 @@ CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore,
case OutputType::BECH32: {
CTxDestination witdest = WitnessV0ScriptHash(script);
CScript witprog = GetScriptForDestination(witdest);
// Check if the resulting program is solvable (i.e. doesn't use an uncompressed key)
if (!IsSolvable(keystore, witprog)) return ScriptHash(script);
// Add the redeemscript, so that P2WSH and P2SH-P2WSH outputs are recognized as ours.
keystore.AddCScript(witprog);
if (type == OutputType::BECH32) {