spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.45k stars 3.09k forks source link

createmultisig on command-line doesn't sort pubkeys #5343

Open kyuupichan opened 5 years ago

kyuupichan commented 5 years ago

I would expect

$ ./ run_electrum createmultisig 2 '["03b25918969e43702abeb6a60942e72e3a3c603dfd272de59e7679a52f35527ccf", "0383cf538b41dbba7b7ee57a53bc673fef8a6896734ae587032f755ac0cba86cc2"]'

to return the correct result it returns when the keys are reversed:

{
    "address": "3AiUfSRMbvXzyAHhFoFAtVFibWPdkNV9DW",
    "redeemScript": "52210383cf538b41dbba7b7ee57a53bc673fef8a6896734ae587032f755ac0cba86cc22103b25918969e43702abeb6a60942e72e3a3c603dfd272de59e7679a52f35527ccf52ae"
}
ecdsa commented 5 years ago

IIRC it follows what bitcoind does.

kyuupichan commented 5 years ago

Hmm, OK. I would have thought the purpose was to generate addresses for a merchant script; any script doing so would receive payments that it couldn't spend with Electrum

ecdsa commented 5 years ago

we can change that. we just need to weight the pros and cons