linkage finally working.

This commit is contained in:
Christopher Jeffrey 2014-09-10 16:57:18 -07:00
parent 03ff3dba23
commit a3cd9025fa
4 changed files with 15 additions and 5 deletions

View File

@ -1,4 +1,5 @@
all:
@node-gyp clean 2>/dev/null
node-gyp configure
node-gyp build

View File

@ -31,11 +31,9 @@
'-lboost_thread',
'-lboost_chrono',
# leveldb:
'-L<!(echo "$HOME")/bitcoin/src/leveldb/libleveldb.a',
#'<!(echo "$HOME")/bitcoin/src/leveldb/libleveldb.a',
# bitcoind:
'-L<!(echo "$HOME")/bitcoin/src/bitcoind',
#'-L<!(echo "$HOME")/bitcoin/src/bitcoind_root.so',
# '-L/usr/bin/bitcoind',
'<!(echo "$HOME")/bitcoin/src/libbitcoind.so',
]
}]
}

View File

@ -32,6 +32,12 @@ function Bitcoin(options) {
self.emit('open', status);
});
// bitcoind's boost threads aren't in the thread pool
// or on node's event loop, so we need to keep node open.
this._interval = setInterval(function() {
;
}, 10000);
this.log('log pipe opened: %d', this.log_pipe);
}
@ -56,6 +62,10 @@ Bitcoin.prototype.error = function() {
return process.stderr.write('bitcoind: ' + out + '\n');
};
Bitcoin.prototype.close = function() {
clearInterval(this._interval);
delete this._interval;
};
/**
* Expose

View File

@ -279,7 +279,8 @@ start_node(void) {
detectShutdownThread = new boost::thread(
boost::bind(&DetectShutdownThread, &threadGroup));
for (int i = 0; i < nScriptCheckThreads - 1; i++) {
int _nScriptCheckThreads = 0;
for (int i = 0; i < _nScriptCheckThreads - 1; i++) {
threadGroup.create_thread(&ThreadScriptCheck);
}