Basically I'm trying to do multisig.
I had no issue creating the multisig address, but sending the raw transaction seems to have me stuck.
createrawtransaction (seems to be success, I get the hash and no errors)
signrawtransaction (also seems good no errors)
my 2nd sign rawtransaction it produces another hash but it still shows "complete":false
I'm using this (
https://gist.githubusercontent.com/gavinandresen/3966071/raw/1f6cfa4208bc82ee5039876b4f065a705ce64df7/TwoOfThree.sh) as a reference and looks like it should say complete:true after the 2nd signing. What am I doing wrong?
I tried to sendrawtransaction just in case with the hash it gave me but error.
Here's my info, I'm not worried about anyone having these private keys or stealing the 25 cents worth of BTC in this multisig address just trying to figure this out.
//3 public/private key pairs to create the multisig
a= 5JmRCnXCAEk9patpLQ6kGVMCw8zMqTwSQGmq2ees6qEcSqbQ3JQ(031D7C97B6B901EE97C191EF6B12E8B9D7D3DDFFF122B203A5FEB4D4AA274EAB35)
b = 5Hs9DSiJEb6fMKWSThErN66bFygddFtPGADxzpt9VX4cB2bZbVs(033DF3003F8C8830C150979C554A046D993E602321CD1A0FF347335B28B27106AD)
c = 5JRQnwUhCGn8gxHCAY4C1KsrJK1u9Za7LpSBtYV2pDPyNsmHMam(02A5A216F1F43DA7E2DD9DB1DB05325F79B6C729C7936CF97B83BC2E4046089D8E)
//Entered this code into the console
createmultisig 2
'["031D7C97B6B901EE97C191EF6B12E8B9D7D3DDFFF122B203A5FEB4D4AA274EAB35","033DF3003F8C8830C150979C554A046D993E602321CD1A0FF347335B28B27106AD","02A5A216F1F43DA7E2DD9DB1DB05325F79B6C729C7936CF97B83BC2E4046089D8E"]'
//console output the below
{
"address" : "32NPCzDQHLGf5Gfg2kb2Sep85NMrCZiEvG",
"redeemScript" : "5221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53ae"
}
//sent some BTC to this address, this is the txid
TXid = "95ef75c9640b856bf7626f83d484f4ed04a10b86d08befa2c3435a02dc46c511";
//create a raw transaction in the console:
createrawtransaction
'[{"txid":"95ef75c9640b856bf7626f83d484f4ed04a10b86d08befa2c3435a02dc46c511","vout":0,"scriptPubKey":
"a9140771fd34e1f24a620939bda6e399ab52a71434a187","redeemScript":"5221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53ae"}]'
'{"1J9ikqFuwrzPbczsDkquA9uVYeq6dEehsj":0.0008}'
//the create transaction outputs the below hash.
hash1: 010000000111c546dc025a43c3a2ef8bd0860ba104edf484d4836f62f76b850b64c975ef950000000000ffffffff0180380100000000001976a914bc20526aca4c47b805511abc6b81d4f15dc3f38c88ac00000000
//Do the first sign of the transaction using hash1
signrawtransaction '010000000111c546dc025a43c3a2ef8bd0860ba104edf484d4836f62f76b850b64c975ef950000000000ffffffff0180380100000000001976a914bc20526aca4c47b805511abc6b81d4f15dc3f38c88ac00000000'
'[{"txid":"95ef75c9640b856bf7626f83d484f4ed04a10b86d08befa2c3435a02dc46c511","vout":0,"scriptPubKey":
"a9140771fd34e1f24a620939bda6e399ab52a71434a187","redeemScript":"5221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53ae"}]'
'["5JmRCnXCAEk9patpLQ6kGVMCw8zMqTwSQGmq2ees6qEcSqbQ3JQ"]'
//First signtransaction outputs the below hash:
hash2: 010000000111c546dc025a43c3a2ef8bd0860ba104edf484d4836f62f76b850b64c975ef95000000006c004c695221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53aeffffffff0180380100000000001976a914bc20526aca4c47b805511abc6b81d4f15dc3f38c88ac00000000
//Now sign hash2 with another private key:
signrawtransaction '010000000111c546dc025a43c3a2ef8bd0860ba104edf484d4836f62f76b850b64c975ef95000000006c004c695221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53aeffffffff0180380100000000001976a914bc20526aca4c47b805511abc6b81d4f15dc3f38c88ac00000000'
'[{"txid":"95ef75c9640b856bf7626f83d484f4ed04a10b86d08befa2c3435a02dc46c511","vout":0,"scriptPubKey":
"a9140771fd34e1f24a620939bda6e399ab52a71434a187","redeemScript":"5221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53ae"}]'
'["5Hs9DSiJEb6fMKWSThErN66bFygddFtPGADxzpt9VX4cB2bZbVs"]'
//The second signing outputs this hash, but shows complete is false
hash3:
{
"hex" : "010000000111c546dc025a43c3a2ef8bd0860ba104edf484d4836f62f76b850b64c975ef95000000006e0000004c695221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53aeffffffff0180380100000000001976a914bc20526aca4c47b805511abc6b81d4f15dc3f38c88ac00000000",
"complete" : false
}
//When trying to send using the hex from the 3rd hash
sendrawtransaction 010000000111c546dc025a43c3a2ef8bd0860ba104edf484d4836f62f76b850b64c975ef95000000006e0000004c695221031d7c97b6b901ee97c191ef6b12e8b9d7d3ddfff122b203a5feb4d4aa274eab3521033df3003f8c8830c150979c554a046d993e602321cd1a0ff347335b28b27106ad2102a5a216f1f43da7e2dd9db1db05325f79b6c729c7936cf97b83bc2e4046089d8e53aeffffffff0180380100000000001976a914bc20526aca4c47b805511abc6b81d4f15dc3f38c88ac00000000
16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) (code -26)