From 7332ef28205498594769b33f23ea95d4a30ccbec Mon Sep 17 00:00:00 2001 From: leonardo-sj Date: Fri, 15 May 2020 22:10:32 -0300 Subject: [PATCH] Update 03_3__Interlude_Using_Command-Line_Variables.md As explained in previous file of this book, if the "legacy" option is not used, the signature can't be made. $ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress) $ echo $NEW_ADDRESS_1 2MxuvthTutriscciS5WkjixoMDneEizSwVW $ NEW_SIG_1=$(bitcoin-cli signmessage $NEW_ADDRESS_1 "Hello World") error code: -3 error message: Address does not refer to key --- 03_3__Interlude_Using_Command-Line_Variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03_3__Interlude_Using_Command-Line_Variables.md b/03_3__Interlude_Using_Command-Line_Variables.md index 11eaa68..18b069a 100644 --- a/03_3__Interlude_Using_Command-Line_Variables.md +++ b/03_3__Interlude_Using_Command-Line_Variables.md @@ -13,7 +13,7 @@ That's a simple command substitution, the equivalent to ``VARIABLE=`command` ``. To create a new address would then look like this: ``` $ unset NEW_ADDRESS_1 -$ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress) +$ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress "" legacy) ``` These commands clear the NEW_ADDRESS_1 variable, just to be sure, then fill it with the results of the `bitcoin-cli getnewaddress` command.