mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
outputtype: remove redundant check for uncompressed keys in AddAndGetDestinationForScript
It's already checked by its (only) caller, AddAndGetMultisigDestination.
This commit is contained in:
@@ -91,8 +91,6 @@ CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore,
|
|||||||
case OutputType::BECH32: {
|
case OutputType::BECH32: {
|
||||||
CTxDestination witdest = WitnessV0ScriptHash(script);
|
CTxDestination witdest = WitnessV0ScriptHash(script);
|
||||||
CScript witprog = GetScriptForDestination(witdest);
|
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.
|
// Add the redeemscript, so that P2WSH and P2SH-P2WSH outputs are recognized as ours.
|
||||||
keystore.AddCScript(witprog);
|
keystore.AddCScript(witprog);
|
||||||
if (type == OutputType::BECH32) {
|
if (type == OutputType::BECH32) {
|
||||||
|
|||||||
Reference in New Issue
Block a user