Fix example and formatting issue.
This commit is contained in:
parent
f488f3ff62
commit
b1aac02078
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bitcoind.js example
|
* bitcoind.js example
|
||||||
*/
|
*/
|
||||||
|
@ -9,10 +11,9 @@ process.title = 'bitcoind.js';
|
||||||
/**
|
/**
|
||||||
* bitcoind
|
* bitcoind
|
||||||
*/
|
*/
|
||||||
var bitcoindjsConf = process.env('BITCOINDJS_DIR');
|
|
||||||
|
|
||||||
var bitcoind = require('../')({
|
var bitcoind = require('../')({
|
||||||
directory: '~/.libbitcoind-example'
|
directory: process.env.BITCOINDJS_DIR || '~/.bitcoin'
|
||||||
});
|
});
|
||||||
|
|
||||||
bitcoind.on('error', function(err) {
|
bitcoind.on('error', function(err) {
|
||||||
|
|
|
@ -196,7 +196,8 @@ Bitcoin.prototype.start = function(options, callback) {
|
||||||
bitcoindjs.start(options, function(err, status) {
|
bitcoindjs.start(options, function(err, status) {
|
||||||
self._started = true;
|
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() {
|
process.on(signal.name, signal.listener = function() {
|
||||||
if (process.listeners(signal.name).length > 1) {
|
if (process.listeners(signal.name).length > 1) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue