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