Skip to content

Commit 59b49cd

Browse files
committed
Eliminate signed/unsigned comparison warning
1 parent 04b5d23 commit 59b49cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2849,7 +2849,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
28492849
// blocks which are too close in height to the tip. Apply this test
28502850
// regardless of whether pruning is enabled; it should generally be safe to
28512851
// not process unrequested blocks.
2852-
bool fTooFarAhead = (pindex->nHeight - chainActive.Height()) > MIN_BLOCKS_TO_KEEP;
2852+
bool fTooFarAhead = (pindex->nHeight > int(chainActive.Height() + MIN_BLOCKS_TO_KEEP));
28532853

28542854
// TODO: deal better with return value and error conditions for duplicate
28552855
// and unrequested blocks.

0 commit comments

Comments
 (0)