fix error when syncing and last block height is < 1

This commit is contained in:
joeuhren
2019-10-01 19:31:28 -06:00
parent 16ac95cec3
commit 34ac49b3b8
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -671,6 +671,7 @@ module.exports = {
// updates tx, address & richlist db's; called by sync.js
update_tx_db: function(coin, start, end, timeout, cb) {
var complete = false;
if (start < 1) start = 1; // fix for invalid block height (skip genesis block as it should not have valid txs)
lib.syncLoop((end - start) + 1, function (loop) {
var x = loop.iteration();
if (x % 5000 === 0) {
+1
View File
@@ -671,6 +671,7 @@ module.exports = {
// updates tx, address & richlist db's; called by sync.js
update_tx_db: function(coin, start, end, timeout, cb) {
var complete = false;
if (start < 1) start = 1; // fix for invalid block height (skip genesis block as it should not have valid txs)
lib.syncLoop((end - start) + 1, function (loop) {
var x = loop.iteration();
if (x % 5000 === 0) {