mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-02 11:41:18 +00:00
rpc: fix inappropriate warning for address type p2sh-segwit in createmultisig and addmultisigaddress
Github-Pull: #25220 Rebased-From: eaf6f630c0190c634b5f1c85f749437f4209cc36
This commit is contained in:
parent
c3936cc53d
commit
7658055c4e
@ -169,11 +169,11 @@ static RPCHelpMan createmultisig()
|
||||
result.pushKV("descriptor", descriptor->ToString());
|
||||
|
||||
UniValue warnings(UniValue::VARR);
|
||||
if (!request.params[2].isNull() && OutputTypeFromDestination(dest) != output_type) {
|
||||
if (descriptor->GetOutputType() != output_type) {
|
||||
// Only warns if the user has explicitly chosen an address type we cannot generate
|
||||
warnings.push_back("Unable to make chosen address type, please ensure no uncompressed public keys are present.");
|
||||
}
|
||||
if (warnings.size()) result.pushKV("warnings", warnings);
|
||||
if (!warnings.empty()) result.pushKV("warnings", warnings);
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
@ -302,11 +302,11 @@ RPCHelpMan addmultisigaddress()
|
||||
result.pushKV("descriptor", descriptor->ToString());
|
||||
|
||||
UniValue warnings(UniValue::VARR);
|
||||
if (!request.params[3].isNull() && OutputTypeFromDestination(dest) != output_type) {
|
||||
if (descriptor->GetOutputType() != output_type) {
|
||||
// Only warns if the user has explicitly chosen an address type we cannot generate
|
||||
warnings.push_back("Unable to make chosen address type, please ensure no uncompressed public keys are present.");
|
||||
}
|
||||
if (warnings.size()) result.pushKV("warnings", warnings);
|
||||
if (!warnings.empty()) result.pushKV("warnings", warnings);
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user