3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 06:44:16 +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) if (length != UNKNOWN_LENGTH)
return length; return length;
if (addresses != null) { if (addresses != null) {

View File

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

View File

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

View File

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

View File

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