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 are not safe for use by multiple threads.
items, MAX_INVENTORY_ITEMScursor, length, MAX_SIZE, offset, params, payload, recached, serializer, UNKNOWN_LENGTH| Constructor and Description |
|---|
GetDataMessage(NetworkParameters params) |
GetDataMessage(NetworkParameters params,
byte[] payloadBytes) |
GetDataMessage(NetworkParameters params,
byte[] payload,
MessageSerializer serializer,
int length)
Deserializes a 'getdata' message.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(Sha256Hash hash,
boolean includeWitness) |
void |
addFilteredBlock(Sha256Hash hash) |
void |
addTransaction(Sha256Hash hash,
boolean includeWitness) |
Sha256Hash |
getHashOf(int i) |
addItem, bitcoinSerializeToStream, equals, getItems, hashCode, parse, removeItem, toStringadjustLength, bitcoinSerialize, bitcoinSerialize, getHash, getMessageSize, getParams, hasMoreBytes, isCached, isRecached, readByte, readByteArray, readBytes, readHash, readInt64, readStr, readUint32, readUint64, readVarInt, readVarInt, setSerializer, unCache, unsafeBitcoinSerializepublic GetDataMessage(NetworkParameters params, byte[] payloadBytes) throws ProtocolException
ProtocolExceptionpublic GetDataMessage(NetworkParameters params, byte[] payload, MessageSerializer serializer, int length) throws ProtocolException
params - NetworkParameters object.payload - Bitcoin protocol formatted byte array containing message content.serializer - the serializer to use for this message.length - The length of message if known. Usually this is provided when deserializing of the wire
as the length will be provided as part of the header. If unknown then set to Message.UNKNOWN_LENGTHProtocolExceptionpublic GetDataMessage(NetworkParameters params)
public void addTransaction(Sha256Hash hash, boolean includeWitness)
public void addBlock(Sha256Hash hash, boolean includeWitness)
public void addFilteredBlock(Sha256Hash hash)
public Sha256Hash getHashOf(int i)