0

Try to use the Lockunspend RPC in bitcoin core wallet console. But always get wrong, and google it can't find answer.

My input is:

lockunspent false "[{"txid":"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c","vout":0}]"

Is anyone can teach me where I am wrong? Thanks

  • What is the error that you get? – Andrew Chow Nov 4 '18 at 18:30
0

The problem is, you should to escape the inner quotes:

lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"
  • Thanks. But it's not work. If with bitcoin-cli, your format should be work. But my problem is how to use is with bitcoin core wallet console. It seems that don't need to escape the inner quotes for console. – yrm23 Oct 2 '18 at 14:08
  • It should work, have you tried? – MCCCS Oct 2 '18 at 14:27
  • 10:37:01  lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]" 10:37:01  Invalid parameter, expected unspent output (code -8) – yrm23 Oct 2 '18 at 14:37
-1

Try double quoting

lockunspent false '[{"\"txid\"":"\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\"","\"vout\"":"0"}]'
  • please explain why this is down voted – mikeytown2 Apr 11 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.