Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const node = new bcoin.FullNode({
- prefix: '/mnt/d/bcoin',
- network: 'testnet',
- indexTX: true,
- indexAddress: true
- });
- (async () => {
- await node.open()
- await node.connect();
- node.on('connect', (entry, block) => {
- console.log('%s (%d) added to chain.', entry.rhash(), entry.height);
- });
- node.on('tx', (tx) => {
- console.log('%s added to mempool.', tx.txid());
- });
- node.startSync();
- })().catch((err) => {
- console.error(err.stack);
- process.exit(1);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement