Package nxt.peer

Class NetworkMessage.GetMilestoneBlockIdsMessage

java.lang.Object
nxt.peer.NetworkMessage
nxt.peer.NetworkMessage.GetMilestoneBlockIdsMessage
Enclosing class:
NetworkMessage

public static class NetworkMessage.GetMilestoneBlockIdsMessage extends NetworkMessage
The GetMilestoneBlockIds message is sent when a peer is downloading the blockchain. The MilestoneBlockIds message is returned in response.
  • Message identifier (long)
  • Last block identifier (long)
  • Last milestone block identifier (long)
  • Constructor Details

    • GetMilestoneBlockIdsMessage

      public GetMilestoneBlockIdsMessage(long lastBlockId, long lastMilestoneBlockId)
      Construct a GetMilestoneBlockIds message
      Parameters:
      lastBlockId - Last block identifier or 0
      lastMilestoneBlockId - Last milestone block identifier or 0
  • Method Details

    • constructMessage

      protected NetworkMessage constructMessage(ByteBuffer bytes) throws BufferOverflowException, BufferUnderflowException, nxt.peer.NetworkException
      Construct the message from the message bytes
      Overrides:
      constructMessage in class NetworkMessage
      Parameters:
      bytes - Message bytes following the message name
      Returns:
      Message
      Throws:
      BufferOverflowException - Message buffer is too small
      BufferUnderflowException - Message is too short
      nxt.peer.NetworkException - Message is not valid
    • getLastBlockId

      public long getLastBlockId()
      Get the last block identifier
      Returns:
      Last block identifier or 0
    • getLastMilestoneBlockIdentifier

      public long getLastMilestoneBlockIdentifier()
      Get the last milestone block identifier
      Returns:
      Last milestone block identifier or 0