Skip to content

Commit

Permalink
Revert "Disable Node deps and profiler"
Browse files Browse the repository at this point in the history
This reverts commit 2e7ec1d.
  • Loading branch information
dworznik committed Mar 8, 2016
1 parent 9b5ef27 commit 544f3e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
21 changes: 10 additions & 11 deletions lib/bcoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@ bcoin.elliptic = require('elliptic');
bcoin.utils = require('./bcoin/utils');

if (!bcoin.isBrowser) {
throw new Error('Node not supported');
// bcoin.fs = require('f' + 's');
// bcoin.crypto = require('cry' + 'pto');
// bcoin.net = require('n' + 'et');
// bcoin.cp = require('child_' + 'process');
// try {
// bcoin.secp256k1 = require('secp' + '256k1');
// } catch (e) {
// utils.debug('Warning: secp256k1 not found.'
// + ' Full block validation will be slow.');
// }
bcoin.fs = require('f' + 's');
bcoin.crypto = require('cry' + 'pto');
bcoin.net = require('n' + 'et');
bcoin.cp = require('child_' + 'process');
try {
bcoin.secp256k1 = require('secp' + '256k1');
} catch (e) {
utils.debug('Warning: secp256k1 not found.'
+ ' Full block validation will be slow.');
}
} else {
bcoin.hash = require('hash.js');
}
Expand Down
4 changes: 2 additions & 2 deletions lib/bcoin/profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ var assert = utils.assert;
var fs = bcoin.fs;
var profiler;

// if (bcoin.profile && !bcoin.isBrowser)
// profiler = require('v8-' + 'profiler');
if (bcoin.profile && !bcoin.isBrowser)
profiler = require('v8-' + 'profiler');

if (profiler) {
utils.nextTick(function() {
Expand Down

0 comments on commit 544f3e1

Please sign in to comment.