mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 14:54:15 +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;
|
int chainHeight = (int) conn.getVersionMessage().bestHeight;
|
||||||
if (chainHeight <= 0) {
|
if (chainHeight <= 0) {
|
||||||
// This should not happen because we shouldn't have given the user a Peer that is to another client-mode
|
// 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.
|
// node, nor should it be unconnected. If that happens it means the user overrode us somewhere or there is
|
||||||
throw new RuntimeException("Connected to peer advertising negative chain height.");
|
// a bug in the peer management code.
|
||||||
|
throw new RuntimeException("Connected to peer advertising zero/negative chain height.");
|
||||||
}
|
}
|
||||||
return chainHeight - blockChain.getChainHead().getHeight();
|
return chainHeight - blockChain.getChainHead().getHeight();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user