Fix example and formatting issue.

This commit is contained in:
Braydon Fuller 2015-07-09 12:55:53 -04:00
parent f488f3ff62
commit b1aac02078
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
#!/usr/bin/env node
'use strict';
/**
* bitcoind.js example
*/
@ -9,10 +11,9 @@ process.title = 'bitcoind.js';
/**
* bitcoind
*/
var bitcoindjsConf = process.env('BITCOINDJS_DIR');
var bitcoind = require('../')({
directory: '~/.libbitcoind-example'
directory: process.env.BITCOINDJS_DIR || '~/.bitcoin'
});
bitcoind.on('error', function(err) {

View File

@ -196,7 +196,8 @@ Bitcoin.prototype.start = function(options, callback) {
bitcoindjs.start(options, function(err, status) {
self._started = true;
// Poll for queued packet [sigint, sighup, sigquit].forEach(function(signal) {
// Poll for queued packet
[sigint, sighup, sigquit].forEach(function(signal) {
process.on(signal.name, signal.listener = function() {
if (process.listeners(signal.name).length > 1) {
return;