order of pubkeys in 'addmultisigaddress' affects the resulting multisig

+1 vote

Hi,

The order of the pubkeys given in addmultisigaddress affects the generated multisigaddress.

Consider non-multisig-addresses A and B with pubkeys pA and pB then

addmultisigaddress 2 [pA,pB]  and addmultisigaddress 2 [pB,pA] generate two different addresses.

(I have tested it only with two addresses)

If this is intended then nevermind. But it was quite an error hunt today to find out...

-zolar-

asked Jul 12, 2018 by zolar
edited Jul 13, 2018 by zolar

1 Answer

+1 vote
 
Best answer
This is indeed the intended behavior, since the ordering determines the contents of the "redeem script" representing that multisignature, and therefore changes that script's hash (this latter item is the actual multisig address).
answered Jul 12, 2018 by MultiChain
selected Jul 13, 2018 by zolar
Oh ok! Thanks for the explanation.
It seemed weird when I encountered this yesterday...
...