Skip to content

Commit

Permalink
fix: parse full chain index when maxBlockNum=0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maltemoeser committed Feb 24, 2020
1 parent cd99c5e commit 5b57be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/parser/chain_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void ChainIndex<RPCTag>::update(const ConfigType &config, blocksci::BlockHeight


auto maxBlockHeight = static_cast<blocksci::BlockHeight>(bapi.getblockcount());
if (blockHeight < 0) {
if (blockHeight <= 0) {
blockHeight = maxBlockHeight + blockHeight;
}
if (blockHeight > maxBlockHeight) {
Expand Down

0 comments on commit 5b57be8

Please sign in to comment.