From 5b57be843220ba15a23ea310841c4f2615235d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20Mo=CC=88ser?= Date: Mon, 24 Feb 2020 16:49:50 -0500 Subject: [PATCH] fix: parse full chain index when maxBlockNum=0 Makes behavior consistent with the disk-based parser, i.e. to parse the full chain up to the maximum height when setting maxBlockNum to 0 --- tools/parser/chain_index.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/parser/chain_index.cpp b/tools/parser/chain_index.cpp index 4c1971ad..6b867b2e 100644 --- a/tools/parser/chain_index.cpp +++ b/tools/parser/chain_index.cpp @@ -194,7 +194,7 @@ void ChainIndex::update(const ConfigType &config, blocksci::BlockHeight auto maxBlockHeight = static_cast(bapi.getblockcount()); - if (blockHeight < 0) { + if (blockHeight <= 0) { blockHeight = maxBlockHeight + blockHeight; } if (blockHeight > maxBlockHeight) {