mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 10:27:29 +00:00 
			
		
		
		
	Update 17_3_getinfo.js
This commit is contained in:
		
							parent
							
								
									bfefdcdc54
								
							
						
					
					
						commit
						fb4fabe88e
					
				| @ -1,5 +1,6 @@ | |||||||
| const RpcAgent = require('bcrpc'); | const RpcAgent = require('bcrpc'); | ||||||
| agent = new RpcAgent({port: 18332, user: 'StandUp', pass: '6305f1b2dbb3bc5a16cd0f4aac7e1eba'}); | agent = new RpcAgent({port: 18332, user: 'StandUp', pass: '6305f1b2dbb3bc5a16cd0 | ||||||
|  | f4aac7e1eba'}); | ||||||
| 
 | 
 | ||||||
| agent.getBlockCount(function (err, blockCount) { | agent.getBlockCount(function (err, blockCount) { | ||||||
|   if (err) |   if (err) | ||||||
| @ -10,6 +11,12 @@ agent.getBlockCount(function (err, blockCount) { | |||||||
|     if (err) |     if (err) | ||||||
|       throw Error(JSON.stringify(err)); |       throw Error(JSON.stringify(err)); | ||||||
|     console.log(hash.result); |     console.log(hash.result); | ||||||
|   }) |   }); | ||||||
|  | 
 | ||||||
|  |   agent.getWalletInfo(function (err, walletInfo) { | ||||||
|  |     if (err) | ||||||
|  |       throw Error(JSON.stringify(err)); | ||||||
|  |     console.log(walletInfo.result); | ||||||
|  |   }); | ||||||
|      |      | ||||||
| }); | }); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user