mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 07:12:17 +00:00
Update comments/exception message in Peer.getPeerBlockHeightDifference()
This commit is contained in:
parent
3bc999a032
commit
2e451800d1
@ -688,8 +688,9 @@ public class Peer {
|
||||
int chainHeight = (int) conn.getVersionMessage().bestHeight;
|
||||
if (chainHeight <= 0) {
|
||||
// This should not happen because we shouldn't have given the user a Peer that is to another client-mode
|
||||
// node. If that happens it means the user overrode us somewhere.
|
||||
throw new RuntimeException("Connected to peer advertising negative chain height.");
|
||||
// node, nor should it be unconnected. If that happens it means the user overrode us somewhere or there is
|
||||
// a bug in the peer management code.
|
||||
throw new RuntimeException("Connected to peer advertising zero/negative chain height.");
|
||||
}
|
||||
return chainHeight - blockChain.getChainHead().getHeight();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user