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) {