From bb27e6b785e61817350627e88909b550377b7dc8 Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Fri, 3 Mar 2017 16:40:50 -0800 Subject: [PATCH] Update 3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md --- 3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md b/3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md index cd461f6..cdfb160 100644 --- a/3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md +++ b/3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md @@ -259,10 +259,12 @@ Our first raw transaction was very simplistic: we sent the entirety of a UTXO to The solution is to create a change address: ``` -$ changeaddress=$(bitcoin-cli getnewaddress) +$ changeaddress=$(bitcoin-cli getrawchangeaddress) $ echo $changeaddress mxU9cmhJfkKWDtBspHaA36LkeafEDeaogJ ``` +Note that this is a new function: `getrawchangeaddress`. It's largely the same as `getnewaddress` but is optimized for use as a change address in a raw transaction, so it doesn't do things like make entries in your address book. + You now have an additional address inside your wallet that you can use to receive change from a UTXO! ## Write a Raw Transaction with Two Outputs