public static class NetworkMessage.GetNextBlocksMessage extends NetworkMessage
NetworkMessage.AddPeersMessage, NetworkMessage.BlockchainStateMessage, NetworkMessage.BlockIdsMessage, NetworkMessage.BlockInventoryMessage, NetworkMessage.BlocksMessage, NetworkMessage.BundlerRateMessage, NetworkMessage.CumulativeDifficultyMessage, NetworkMessage.ErrorMessage, NetworkMessage.GetBlockMessage, NetworkMessage.GetCumulativeDifficultyMessage, NetworkMessage.GetInfoMessage, NetworkMessage.GetMilestoneBlockIdsMessage, NetworkMessage.GetNextBlockIdsMessage, NetworkMessage.GetNextBlocksMessage, NetworkMessage.GetPeersMessage, NetworkMessage.GetTransactionsMessage, NetworkMessage.GetUnconfirmedTransactionsMessage, NetworkMessage.MilestoneBlockIdsMessage, NetworkMessage.TransactionsInventoryMessage, NetworkMessage.TransactionsMessage
MAX_ARRAY_LENGTH, MAX_LIST_SIZE, MAX_LIST_SIZE_PRE_2_3_3, messageId
Constructor and Description |
---|
GetNextBlocksMessage(long blockId,
int limit,
java.util.List<java.lang.Long> blockIds)
Construct a GetNextBlocks message
|
Modifier and Type | Method and Description |
---|---|
protected NetworkMessage |
constructMessage(java.nio.ByteBuffer bytes)
Construct the message from the message bytes
|
long |
getBlockId()
Get the start block identifier
|
java.util.List<java.lang.Long> |
getBlockIds()
Get the block identifiers
|
int |
getLimit()
Get the maximum number of blocks
|
public GetNextBlocksMessage(long blockId, int limit, java.util.List<java.lang.Long> blockIds)
blockId
- Start block identifierlimit
- Maximum number of blocksblockIds
- Block identifier list or nullprotected NetworkMessage constructMessage(java.nio.ByteBuffer bytes) throws java.nio.BufferOverflowException, java.nio.BufferUnderflowException, nxt.peer.NetworkException
constructMessage
in class NetworkMessage
bytes
- Message bytes following the message namejava.nio.BufferOverflowException
- Message buffer is too smalljava.nio.BufferUnderflowException
- Message is too shortNetworkException
- Message is not validpublic long getBlockId()
public int getLimit()
public java.util.List<java.lang.Long> getBlockIds()