File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ Bcoin.prototype.stop = function() {
35
35
Bcoin . prototype . _getConfig = function ( options ) {
36
36
var config = {
37
37
checkpoints : true ,
38
- network : options . network || 'main' ,
39
- listen : true
38
+ network : options . bcoin_network || 'main' ,
39
+ listen : true ,
40
+ logLevel : options . logLevel
40
41
} ;
41
42
if ( options . prefix ) {
42
43
config . prefix = options . prefix ;
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ P2P.prototype._connect = function() {
176
176
} ;
177
177
178
178
P2P . prototype . _getBestHeight = function ( ) {
179
+
179
180
if ( this . _peers === 0 ) {
180
181
return 0 ;
181
182
}
@@ -285,7 +286,6 @@ P2P.prototype._onPeerReady = function(peer, addr) {
285
286
286
287
} ;
287
288
288
-
289
289
P2P . prototype . _onPeerTx = function ( peer , message ) {
290
290
var filteredMessage = this . _applyMempoolFilter ( message ) ;
291
291
if ( filteredMessage ) {
@@ -332,9 +332,16 @@ P2P.prototype._setResourceFilter = function(filter, resource) {
332
332
} ;
333
333
334
334
P2P . prototype . _startBcoin = function ( ) {
335
+ var logLevel ;
336
+ if ( process . env . BITCORE_ENV === 'debug' ) {
337
+ log . info ( 'Debug mode detected, starting Bcoin logger' ) ;
338
+ logLevel = 'info' ;
339
+ }
340
+
335
341
this . _bcoin = new Bcoin ( {
336
342
network : this . node . network ,
337
- prefix : this . node . datadir
343
+ prefix : this . node . datadir ,
344
+ logLevel : logLevel ,
338
345
} ) ;
339
346
this . _bcoin . start ( ) ;
340
347
} ;
You can’t perform that action at this time.
0 commit comments