MsgGetData class
Bitcoin getdata message for requesting specific data This message is used to request one or more data objects from another node. The objects are requested by an inventory vector list.
- Inheritance
-
- Object
- WireMessage
- RegisterableMessage
- MsgGetData
Constructors
-
MsgGetData({List<
InvVect> ? invList}) - MsgGetData.block(Hash blockHash)
-
Create getdata message for block
factory
- MsgGetData.fromInv(MsgInv invMsg)
-
Create getdata message from inventory message
factory
- MsgGetData.single(InvVect item)
-
Create getdata message with single item
factory
- MsgGetData.transaction(Hash txHash)
-
Create getdata message for transaction
factory
Properties
- command → String
-
Get the command string for this message type
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
-
invList
↔ List<
InvVect> -
getter/setter pair
- maxPayloadLength → int
-
Get maximum payload length for this message type
no setteroverride
-
requestedBlocks
→ List<
Hash> -
Get requested blocks
no setter
-
requestedTransactions
→ List<
Hash> -
Get requested transactions
no setter
- requestsBlocks → bool
-
Check if requesting any blocks
no setter
- requestsTransactions → bool
-
Check if requesting any transactions
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAll(
List< InvVect> items) → void - Add multiple items from another getdata or inv message
-
addBlock(
Hash blockHash) → void - Add block request
-
addInvVect(
InvVect inv) → void - Add inventory item to request
-
addTransaction(
Hash txHash) → void - Add transaction request
-
decode(
Uint8List data, int protocolVersion, MessageEncoding encoding) → void -
Decode message from bytes
override
-
deduplicate(
) → void - Remove duplicate requests
-
encode(
int protocolVersion, MessageEncoding encoding) → Uint8List -
Encode message to bytes
override
-
isRequesting(
Hash hash) → bool - Check if requesting a specific hash
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
int protocolVersion, BitcoinNetwork network) → Uint8List -
Serialize complete message with header
inherited
-
split(
{int maxItems = 500}) → List< MsgGetData> - Split into smaller getdata messages if too large
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
deserialize(
Uint8List data, int protocolVersion, MessageEncoding encoding) → MsgGetData - Factory method for deserialization
-
registerWithFactory(
) → void - Register this message type with the factory