Title: [SOLVED] 0.8.6 createrawtransaction in console (json error) Post by: DannyHamilton on March 16, 2014, 01:04:58 PM I'm trying to use createrawtransaction in the console on 0.8.6 Bitcoin-Qt
It's been a while since I've used createrawtransaction (I think I last did it with 0.8.5), so I suppose I might have forgotten the proper syntax. Can anyone please point out for me where my mistake is? The exact text that I'm pasting into the console is: Code: createrawtransaction [{\"txid\”:\”3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7\”,\”vout\”:1}] {\”1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa\”:0.02106080} The console reports the following: https://i.imgur.com/XBUYTmm.png Thanks in advance for any assistance provided. Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: fsb4000 on March 16, 2014, 01:39:34 PM Code: createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02106080}' Code: 0100000001b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff01e0222000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000 Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: DannyHamilton on March 16, 2014, 01:48:49 PM Code: createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02106080}' Interesting. This is some sort of change for 0.8.6? I'm nearly certain that I didn't used to have to enclose the elements in single quotes when I've used createrawtransaction in the past. Anyhow, I tried your suggestion and it worked. Thanks for the help. Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: fsb4000 on March 16, 2014, 02:02:31 PM Interesting. This is some sort of change for 0.8.6? You're welcome.I'm nearly certain that I didn't used to have to enclose the elements in single quotes when I've used createrawtransaction in the past. Anyhow, thanks for the help. As far as I know there was no change for 0.8.6 I've always used single quotes... August 29, 2012, 08:53:50 https://bitcointalk.org/index.php?topic=104512.msg1144379#msg1144379 Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: DannyHamilton on March 16, 2014, 02:05:53 PM However, I tried the following for spending 2 unspent inputs, and it doesn't work. What mistake am I making here?
Code: createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout”:1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' ‘{\”1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa\”:0.02116080}’ https://i.imgur.com/618dmue.png Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: fsb4000 on March 16, 2014, 02:18:55 PM Code: createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02116080}' Code: 0100000002b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff96c7f5d04c190e321690b1e8990bb8e9dd51516d191a8fcae8a0dc4f1c44e4510100000000ffffffff01f0492000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000 I changed "slanted" quotation marks to "straight" quotation marks and removed slashes ;) Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: DannyHamilton on March 16, 2014, 02:28:27 PM Code: createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02116080}' Code: 0100000002b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff96c7f5d04c190e321690b1e8990bb8e9dd51516d191a8fcae8a0dc4f1c44e4510100000000ffffffff01f0492000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000 I changed "slanted" quotation marks to "straight" quotation marks and removed slashes ;) Thanks, I had tried it both with and without the slashes. I hadn't tried alternative single quote marks. I'll try that now. EDIT: Yep, that did it! Thanks again. Title: Re: 0.8.6 createrawtransaction in console (json error) Post by: DannyHamilton on March 16, 2014, 03:22:36 PM For anyone else that might be having a similar problem...
After a bit more research, I've discovered that my problem wasn't that I upgraded to 0.8.6, but rather that I started using a new text editor to compose my rawtransaction before pasting it into Bitcoin-Qt. The new text editor that I started using was auto-replacing my plain old regular "dumb" double-quotes (0x22) with "smart quotes" (0xe2 0x80 0x9d) as I was typing and I hadn't noticed. Apparently Bitcoin-Qt doesn't like "smart quotes" I figured out how to turn off the feature in the text editor that was causing the problem, and now my original method (escaping the double quotes with a backslash, instead of enclosing elements in single quotes) works again. Problem solved. Locking topic. |