Update 3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md

This commit is contained in:
Shannon Appelcline 2017-03-03 16:40:50 -08:00 committed by GitHub
parent 91b5dcb5e2
commit bb27e6b785

View File

@ -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