3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Make getMessageSize() public

This commit is contained in:
Matt Corallo 2012-10-18 18:55:04 -04:00 committed by Mike Hearn
parent 49d26f6e28
commit 91cd289a5c
5 changed files with 5 additions and 5 deletions

View File

@ -96,7 +96,7 @@ public class AddressMessage extends Message {
}
}
int getMessageSize() {
public int getMessageSize() {
if (length != UNKNOWN_LENGTH)
return length;
if (addresses != null) {

View File

@ -46,7 +46,7 @@ public abstract class EmptyMessage extends Message {
}
@Override
int getMessageSize() {
public int getMessageSize() {
return 0;
}

View File

@ -393,7 +393,7 @@ public abstract class Message implements Serializable {
*
* @return
*/
int getMessageSize() {
public int getMessageSize() {
if (length != UNKNOWN_LENGTH)
return length;
maybeParse();

View File

@ -152,7 +152,7 @@ public class PeerAddress extends ChildMessage {
* @see Message#getMessageSize()
*/
@Override
int getMessageSize() {
public int getMessageSize() {
// The 4 byte difference is the uint32 timestamp that was introduced in version 31402
length = protocolVersion > 31402 ? MESSAGE_SIZE : MESSAGE_SIZE - 4;
return length;

View File

@ -97,7 +97,7 @@ public class TransactionOutPoint extends ChildMessage implements Serializable {
* @see Message#getMessageSize()
*/
@Override
int getMessageSize() {
public int getMessageSize() {
return MESSAGE_LENGTH;
}