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() {
3535Bcoin . prototype . _getConfig = function ( options ) {
3636 var config = {
3737 checkpoints : true ,
38- network : options . network || 'main' ,
39- listen : true
38+ network : options . bcoin_network || 'main' ,
39+ listen : true ,
40+ logLevel : options . logLevel
4041 } ;
4142 if ( options . prefix ) {
4243 config . prefix = options . prefix ;
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ P2P.prototype._connect = function() {
176176} ;
177177
178178P2P . prototype . _getBestHeight = function ( ) {
179+
179180 if ( this . _peers === 0 ) {
180181 return 0 ;
181182 }
@@ -285,7 +286,6 @@ P2P.prototype._onPeerReady = function(peer, addr) {
285286
286287} ;
287288
288-
289289P2P . prototype . _onPeerTx = function ( peer , message ) {
290290 var filteredMessage = this . _applyMempoolFilter ( message ) ;
291291 if ( filteredMessage ) {
@@ -332,9 +332,16 @@ P2P.prototype._setResourceFilter = function(filter, resource) {
332332} ;
333333
334334P2P . 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+
335341 this . _bcoin = new Bcoin ( {
336342 network : this . node . network ,
337- prefix : this . node . datadir
343+ prefix : this . node . datadir ,
344+ logLevel : logLevel ,
338345 } ) ;
339346 this . _bcoin . start ( ) ;
340347} ;
You can’t perform that action at this time.
0 commit comments