More JavaDocs for PeerAddress and default the port for the prodnet rather than zero, which is pretty useless.

This commit is contained in:
Mike Hearn
2012-02-13 20:46:42 +01:00
parent 1204a901e6
commit 2c93dfba32

View File

@@ -80,12 +80,18 @@ public class PeerAddress extends ChildMessage {
length = protocolVersion > 31402 ? MESSAGE_SIZE : MESSAGE_SIZE - 4;
}
/**
* Constructs a peer address from the given IP address and port. Protocol version is the default.
*/
public PeerAddress(InetAddress addr, int port) {
this(addr, port, NetworkParameters.PROTOCOL_VERSION);
}
/**
* Constructs a peer address from the given IP address. Port and protocol version are default for the prodnet.
*/
public PeerAddress(InetAddress addr) {
this(addr, 0);
this(addr, NetworkParameters.prodNet().port);
}
public PeerAddress(InetSocketAddress addr) {