tuweni / org.apache.tuweni.devp2p.eth / EthRequestsManager / requestBlockHeaders

requestBlockHeaders

abstract fun requestBlockHeaders(blockHashes: List<Hash>, connection: WireConnection = connectionSelectionStrategy().selectConnection()): AsyncResult<List<BlockHeader>> (source)

Requests block headers

Parameters

blockHashes - the block hashes

connection - the connection to use

Return
a handle to the completion of the operation

abstract fun requestBlockHeaders(blockHash: Hash, maxHeaders: Long, skip: Long, reverse: Boolean, connection: WireConnection = connectionSelectionStrategy().selectConnection()): AsyncResult<List<BlockHeader>> (source)

Requests block headers

Parameters

blockHash - the hash of the block

maxHeaders - the max number of headers to provide

skip - the headers to skip in between each header provided

reverse - whether to provide headers in forward or backwards order

connection - the connection to use

Return
a handle to the completion of the operation

abstract fun requestBlockHeaders(blockNumber: Long, maxHeaders: Long, skip: Long, reverse: Boolean, connection: WireConnection = connectionSelectionStrategy().selectConnection()): AsyncResult<List<BlockHeader>> (source)

Requests block headers

Parameters

blockNumber - the number of the block

maxHeaders - the max number of headers to provide

skip - the headers to skip in between each header provided

reverse - whether to provide headers in forward or backwards order

connection - the connection to use

Return
a handle to the completion of the operation