Class GetDataMessage

  • All Implemented Interfaces:
    Message

    public class GetDataMessage
    extends ListMessage

    Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their hashes.

    Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.

    • Constructor Detail

      • GetDataMessage

        @Deprecated
        public GetDataMessage()
        Deprecated.
    • Method Detail

      • read

        public static GetDataMessage read​(java.nio.ByteBuffer payload)
                                   throws java.nio.BufferUnderflowException,
                                          ProtocolException
        Deserialize this message from a given payload.
        Parameters:
        payload - payload to deserialize from
        Returns:
        read message
        Throws:
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        ProtocolException
      • addTransaction

        @Deprecated
        public void addTransaction​(Sha256Hash hash,
                                   boolean includeWitness)
        Deprecated.
      • addBlock

        @Deprecated
        public void addBlock​(Sha256Hash hash,
                             boolean includeWitness)
        Deprecated.
      • addFilteredBlock

        @Deprecated
        public void addFilteredBlock​(Sha256Hash hash)
        Deprecated.
      • getHashOf

        public Sha256Hash getHashOf​(int i)