mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-30 18:07:22 +00:00 
			
		
		
		
	Create 15_1_testbitcoin.c
This commit is contained in:
		
							parent
							
								
									8397b1c082
								
							
						
					
					
						commit
						2389e6d166
					
				
							
								
								
									
										23
									
								
								src/15_1_testbitcoin.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/15_1_testbitcoin.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| #include <jansson.h> | ||||
| #include <bitcoinrpc.h> | ||||
| 
 | ||||
| int main(void) { | ||||
|    | ||||
|   bitcoinrpc_global_init(); | ||||
| 
 | ||||
|   bitcoinrpc_cl_t *rpc_client; | ||||
|   rpc_client = bitcoinrpc_cl_init_params ("bitcoinrpc", "d8340efbcd34e312044c8431c59c792c", "127.0.0.1", 18332); | ||||
| 
 | ||||
|   if (rpc_client) { | ||||
| 
 | ||||
|     printf("Successfully connected to server!\n"); | ||||
|    | ||||
|   } else { | ||||
| 
 | ||||
|     printf("Failed to connect to server!\n"); | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   bitcoinrpc_global_cleanup(); | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user