forked from Qortal/qortal
Don't try to sync with a peer that only has genesis block
Was 85bc70b: new testchain timestamp + don't try to sync with a peer that only has genesis block
This commit is contained in:
parent
eac38d4212
commit
4744232a1c
@ -83,6 +83,10 @@ public class Synchronizer {
|
||||
LOGGER.info(String.format("Common block with peer %s is at height %d", peer, commonBlockHeight));
|
||||
signatures.remove(0);
|
||||
|
||||
// If common block is genesis block then peer has no blocks so ignore them for a while
|
||||
if (commonBlockHeight == 1)
|
||||
return false;
|
||||
|
||||
// If common block is peer's latest block then we simply have a longer chain to peer, so exit now
|
||||
if (commonBlockHeight == peerHeight)
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user