Guest User

Untitled

a guest
Sep 4th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. { Error: connect ECONNREFUSED 127.0.0.1:18332
  2. at Object._errnoException (util.js:992:11)
  3. at _exceptionWithHostPort (util.js:1014:20)
  4. at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
  5. code: 'ECONNREFUSED',
  6. errno: 'ECONNREFUSED',
  7. syscall: 'connect',
  8. address: '127.0.0.1',
  9. port: 18332 }
  10.  
  11. testnet=1
  12. rpcuser=user
  13. rpcpassword=password
  14. rpcallowip=192.163.1.131
  15.  
  16. var bitcoin = require('bitcoin');
  17. var client = new bitcoin.Client({
  18. host: 'localhost',
  19. port: 1426,
  20. user: 'akshay',
  21. pass: 'kappsoft'
  22.  
  23. });
  24.  
  25. client.getDifficulty(function(err, difficulty) {
  26. if (err) {
  27. return console.error(err);
  28. }
  29.  
  30. console.log('Difficulty: ' + difficulty);
  31. });
Add Comment
Please, Sign In to add comment