Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. const node = new bcoin.FullNode({
  2. prefix: '/mnt/d/bcoin',
  3. network: 'testnet',
  4. indexTX: true,
  5. indexAddress: true
  6. });
  7.  
  8. (async () => {
  9. await node.open()
  10. await node.connect();
  11.  
  12. node.on('connect', (entry, block) => {
  13. console.log('%s (%d) added to chain.', entry.rhash(), entry.height);
  14. });
  15.  
  16. node.on('tx', (tx) => {
  17. console.log('%s added to mempool.', tx.txid());
  18. });
  19.  
  20. node.startSync();
  21. })().catch((err) => {
  22. console.error(err.stack);
  23. process.exit(1);
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement