diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2019-06-21 19:43:13 +1200 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2019-06-21 19:44:08 +1200 |
commit | 303ec103bacf2c9498d567210dd77c1305bddf81 (patch) | |
tree | a4aaae2a989201ec7a9a22ad351ce69d9768057b /src/rpc/misc.cpp | |
parent | 23815ee74dfd08c746a70eeee4eeb1ad3af052f1 (diff) | |
parent | a49503402b6bc21e3878e151c07529941d36aed0 (diff) |
Merge #16026: Ensure that uncompressed public keys in a multisig always returns a legacy address
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
ACKs for commit a49503:
Tree-SHA512: 5b0154a714deea3b2cc3a54beb420c95eeeacf4ca30c40ca80940d9d640f8b03611b0fc14c2f0710bfd8a79e8d27ad7d9ae380b4b83d52b40ab201624f2a63f0
Diffstat (limited to 'src/rpc/misc.cpp')
-rw-r--r-- | src/rpc/misc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 2b29fd543b..7a1bdec7b9 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -122,9 +122,9 @@ static UniValue createmultisig(const JSONRPCRequest& request) } // Construct using pay-to-script-hash: - const CScript inner = CreateMultisigRedeemscript(required, pubkeys); CBasicKeyStore keystore; - const CTxDestination dest = AddAndGetDestinationForScript(keystore, inner, output_type); + CScript inner; + const CTxDestination dest = AddAndGetMultisigDestination(required, pubkeys, output_type, keystore, inner); UniValue result(UniValue::VOBJ); result.pushKV("address", EncodeDestination(dest)); |