mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	Update 3_4_Sending_a_Raw_Transaction_to_a_P2PKH.md
This commit is contained in:
		
							parent
							
								
									91b5dcb5e2
								
							
						
					
					
						commit
						bb27e6b785
					
				| @ -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: | The solution is to create a change address: | ||||||
| ``` | ``` | ||||||
| $ changeaddress=$(bitcoin-cli getnewaddress) | $ changeaddress=$(bitcoin-cli getrawchangeaddress) | ||||||
| $ echo $changeaddress | $ echo $changeaddress | ||||||
| mxU9cmhJfkKWDtBspHaA36LkeafEDeaogJ | 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! | 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 | ## Write a Raw Transaction with Two Outputs | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user