Page MenuHomePhabricator

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

Authored by majcosta on Jun 12 2020, 16:17.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix requested changes to this revision.Jun 12 2020, 16:38
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/rpc/util.cpp
7 ↗(On Diff #21329)

Let's include it in the .h and the .cpp for good measure XD

9 ↗(On Diff #21329)

Maybe this guy needs to be first.

test/functional/rpc_createmultisig.py
81 ↗(On Diff #21329)

Remove redundant tests.

This revision now requires changes to proceed.Jun 12 2020, 16:38
This revision is now accepted and ready to land.Jun 12 2020, 17:42