HomePhabricator

[backport#16026] Ensure that uncompressed public keys in a multisig always…

Description

[backport#16026] Ensure that uncompressed public keys in a multisig always returns a legacy address

Summary:
a49503402b6bc21e3878e151c07529941d36aed0 Make and get the multisig redeemscript and destination in one function instead of two (Andrew Chow)

Pull request description:

`CreateMultisigRedeemscript()` is changed to `AddAndGetMultisigDestination()` so that the process of constructing the redeemScript and then getting the `CTxDestination` are done in the same function. This allows that function to see what the keys in the multisig are so that the correct address type is returned from `AddAndGetDestinationForScript()`.

This only effects the `createmultisig` and `addmultisigaddress` RPCs and does not change signing logic as #16022 does.

Alternative to #16022 and #16012

Fixes #16011

Backport of Core PR16026

Test Plan:

ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6552

Details

Provenance
MeshCollider <dobsonsa68@gmail.com>Authored on Jun 21 2019, 07:43
majcostaCommitted on Jun 12 2020, 22:42
majcostaPushed on Jun 12 2020, 22:42
Reviewer
Restricted Project
Differential Revision
D6552: [backport#16026] Ensure that uncompressed public keys in a multisig always returns a legacy address
Parents
rABCa42abd11cf08: [backport#15831] test: Add test that addmultisigaddress fails for watchonly…
Branches
Unknown
Tags
Unknown