From 7301cf044edf4c4dd3c43175fb7726be9b31a0a2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 20 Apr 2016 03:42:49 -0700 Subject: [PATCH] increment total block count on alternate chains. --- lib/bcoin/chain.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 953d903a..ce509a8e 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -1540,6 +1540,10 @@ Chain.prototype.add = function add(block, callback, force) { if (err) return callback(err); + // Keep track of the number of blocks we + // added and the number of orphans resolved. + total++; + // Emit our block (and potentially resolved // orphan) only if it is on the main chain. self.emit('competitor', block, entry);