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:
parent
49d26f6e28
commit
91cd289a5c
@ -96,7 +96,7 @@ public class AddressMessage extends Message {
|
||||
}
|
||||
}
|
||||
|
||||
int getMessageSize() {
|
||||
public int getMessageSize() {
|
||||
if (length != UNKNOWN_LENGTH)
|
||||
return length;
|
||||
if (addresses != null) {
|
||||
|
@ -46,7 +46,7 @@ public abstract class EmptyMessage extends Message {
|
||||
}
|
||||
|
||||
@Override
|
||||
int getMessageSize() {
|
||||
public int getMessageSize() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ public abstract class Message implements Serializable {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getMessageSize() {
|
||||
public int getMessageSize() {
|
||||
if (length != UNKNOWN_LENGTH)
|
||||
return length;
|
||||
maybeParse();
|
||||
|
@ -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;
|
||||
|
@ -97,7 +97,7 @@ public class TransactionOutPoint extends ChildMessage implements Serializable {
|
||||
* @see Message#getMessageSize()
|
||||
*/
|
||||
@Override
|
||||
int getMessageSize() {
|
||||
public int getMessageSize() {
|
||||
return MESSAGE_LENGTH;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user