Class: GetBlocksPacket

net/packets~GetBlocksPacket(locator, stopnullable)

GetBlocks Packet

Constructor

new GetBlocksPacket(locator, stopnullable)

Create a getblocks packet.

Parameters:
Name Type Attributes Description
locator Array.<Hash>
stop Hash <nullable>
Properties:
Name Type Description
locator Array.<Hash>
stop Hash | null
Source:

Extends

  • Packet

Methods

(static) fromRaw(data, encnullable) → {GetBlocksPacket}

Instantiate getblocks packet from serialized data.

Parameters:
Name Type Attributes Description
data Buffer
enc String <nullable>
Source:
Returns:
Type
GetBlocksPacket

(private) fromRaw(data)

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:

(private) fromReader(br)

Inject properties from buffer reader.

Parameters:
Name Type Description
br BufferReader
Source:

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

toRaw() → {Buffer}

Serialize getblocks packet.

Source:
Returns:
Type
Buffer

toWriter(bw)

Serialize getblocks packet to writer.

Parameters:
Name Type Description
bw BufferWriter
Source: