mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	a bit of cleanup
This commit is contained in:
		
							parent
							
								
									85f080ccf6
								
							
						
					
					
						commit
						42d0a334ad
					
				| @ -1,4 +1,5 @@ | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #include <assert.h> | ||||
| #include "wally_core.h" | ||||
| #include "wally_transaction.h" | ||||
| @ -20,9 +21,10 @@ int main(int argc, char *argv[]) { | ||||
| 
 | ||||
|   /* 1. Create the P2SH Script */ | ||||
| 
 | ||||
|   unsigned char bscript[4]; | ||||
|   int script_length = strlen(script)/2; | ||||
|   unsigned char bscript[script_length]; | ||||
|      | ||||
|   lw_response = wally_hex_to_bytes(script,bscript,4,&written); | ||||
|   lw_response = wally_hex_to_bytes(script,bscript,script_length,&written); | ||||
|   assert(lw_response == WALLY_OK); | ||||
| 
 | ||||
|   unsigned char p2sh[WALLY_SCRIPTPUBKEY_P2SH_LEN]; | ||||
| @ -72,6 +74,7 @@ int main(int argc, char *argv[]) { | ||||
|   wally_tx_free(tx); | ||||
|   wally_tx_input_free(tx_input); | ||||
|   wally_tx_output_free(tx_output); | ||||
|   wally_tx_free(utxo); | ||||
|    | ||||
|   wally_cleanup(0);   | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user