Author

Topic: [SOLVED] 0.8.6 createrawtransaction in console (json error) (Read 1589 times)

legendary
Activity: 3472
Merit: 4801
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.
legendary
Activity: 3472
Merit: 4801
Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02116080}'
output:
Code:
0100000002b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff96c7f5d04c190e321690b1e8990bb8e9dd51516d191a8fcae8a0dc4f1c44e4510100000000ffffffff01f0492000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000

I changed "slanted" quotation marks to "straight" quotation marks and removed  slashes  Wink

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.
legendary
Activity: 1400
Merit: 1000
Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02116080}'
output:
Code:
0100000002b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff96c7f5d04c190e321690b1e8990bb8e9dd51516d191a8fcae8a0dc4f1c44e4510100000000ffffffff01f0492000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000

I changed "slanted" quotation marks to "straight" quotation marks and removed  slashes  Wink
legendary
Activity: 3472
Merit: 4801
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}’

legendary
Activity: 1400
Merit: 1000
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, thanks for the help.
You're welcome.
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://bitcointalksearch.org/topic/m.1144379

legendary
Activity: 3472
Merit: 4801
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.

legendary
Activity: 1400
Merit: 1000
Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02106080}'
output:
Code:
0100000001b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff01e0222000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000
legendary
Activity: 3472
Merit: 4801
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:



Thanks in advance for any assistance provided.
Jump to: