diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index a8c8e5e6..abea8807 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -105,7 +105,7 @@ Chain.prototype._init = function _init() { // Hook into events for debugging this.on('block', function(block, entry) { - if (self.height < 400000) + if (self.height < network.block.slowHeight) return; bcoin.debug('Block %s (%d) added to chain (%s)', diff --git a/lib/bcoin/protocol/network.js b/lib/bcoin/protocol/network.js index cc29957c..874f3cf8 100644 --- a/lib/bcoin/protocol/network.js +++ b/lib/bcoin/protocol/network.js @@ -278,7 +278,15 @@ main.block = { * determine whether the chain is synced. */ - maxTipAge: 24 * 60 * 60 + maxTipAge: 24 * 60 * 60, + + /** + * Height at which block processing is + * slow enough that we can output + * logs without spamming. + */ + + slowHeight: 400000 }; /** @@ -492,7 +500,8 @@ testnet.block = { bip34hash: 'f88ecd9912d00d3f5c2a8e0f50417d3e415c75b3abe584346da9b32300000000', pruneAfterHeight: 1000, // maxTipAge: 0x7fffffff - maxTipAge: 24 * 60 * 60 + maxTipAge: 24 * 60 * 60, + slowHeight: 700000 }; testnet.witness = false; @@ -619,7 +628,8 @@ regtest.block = { bip34height: -1, bip34hash: null, pruneAfterHeight: 1000, - maxTipAge: 24 * 60 * 60 + maxTipAge: 24 * 60 * 60, + slowHeight: 0x7fffffff }; regtest.witness = false; @@ -745,7 +755,8 @@ segnet3.block = { bip34height: -1, bip34hash: null, pruneAfterHeight: 1000, - maxTipAge: 0x7fffffff + maxTipAge: 0x7fffffff, + slowHeight: 0x7fffffff }; segnet3.witness = true; @@ -853,7 +864,8 @@ segnet4.block = { bip34height: -1, bip34hash: null, pruneAfterHeight: 1000, - maxTipAge: 0x7fffffff + maxTipAge: 0x7fffffff, + slowHeight: 0x7fffffff }; segnet4.witness = true;