Peer: fix and clarify comment about putting genesis hash into BlockLocator

This commit is contained in:
Sean Gilligan 2023-08-08 11:45:47 -07:00 committed by Andreas Schildbach
parent 148a40b2ed
commit 9bbb6b39e3

View file

@ -1447,7 +1447,7 @@ public class Peer extends PeerSocketHandler {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
// Only add the locator if we didn't already do so. If the chain is < 50 blocks we already reached it. // Only add the genesis hash to the locator if we didn't already do so. If the chain is < 100 blocks we already reached it.
if (cursor != null) if (cursor != null)
blockLocator = blockLocator.add(params.getGenesisBlock().getHash()); blockLocator = blockLocator.add(params.getGenesisBlock().getHash());