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

requestBlockHeaders

open fun requestBlockHeaders(blockHash: Hash, maxHeaders: Long, skip: Long, reverse: Boolean, connection: WireConnection): 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

open fun requestBlockHeaders(blockNumber: Long, maxHeaders: Long, skip: Long, reverse: Boolean, connection: WireConnection): 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

open fun requestBlockHeaders(blockHashes: List<Hash>, connection: WireConnection): 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