Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: dansmith on June 01, 2013, 10:34:22 AM



Title: signrawtransaction won't sign
Post by: dansmith on June 01, 2013, 10:34:22 AM
Problem:
signrawtransaction refuses to sign a transaction.

I have created a 2-of-3 address and sent some BTC into it
https://blockchain.info/address/3JNaZ9A1yMpRTGyoG9Vq9MvvjKcECYbSoo

Now I'm trying to create a transaction to spend the BTC out of the 2-of-3 address.

Quote
1. createrawtransaction '[{"txid":"a3b2c1db9424a0623aa92e2ec512f6ff26401c51726151cab842dbaffc2fe81e","vout":0}]' '{"1KSuZeo4TuD9DjbQrrTUao5YSfUQ3fNNVn":0.03}'

01000000011ee82ffcafdb42b8ca516172511c4026fff612c52e2ea93a62a02494dbc1b2a300000 00000ffffffff01c0c62d00000000001976a914ca588a5e4a878c889ec86fc77c7907edd4b67987 88ac00000000
let's call this ^^^ <hex string>

Quote
2. signrawtransaction <hex string> null '["5J...one of the 3 priv keys used to create the 2-of-3 address..SoV"]'

{
"hex" : "01000000011ee82ffcafdb42b8ca516172511c4026fff612c52e2ea93a62a02494dbc1b2a300000 00000ffffffff01c0c62d00000000001976a914ca588a5e4a878c889ec86fc77c7907edd4b67987 88ac00000000",
"complete" : false
}

As you see, nothing gets signed.

I'm using stock bitcoin-qt 0.8.1 fully synced
The private key is definitely there, I can see its corresponding address.
I'm stuck and need advice.


Title: Re: signrawtransaction won't sign
Post by: pc on June 02, 2013, 01:35:33 AM
For a multisig address, you need to pass along to signrawtransaction the information about how to construct the multisig address. Otherwise, it doesn't know how to sign it. I think it goes where you put the "null" parameter… It can't be null to do what you're trying to do.