tuweni / org.apache.tuweni.devp2p.eth / EthController

EthController

class EthController (source)

Controller managing the state of the ETH or LES subprotocol handlers.

Constructors

<init>

Controller managing the state of the ETH or LES subprotocol handlers.

EthController(repository: BlockchainRepository, pendingTransactionsPool: TransactionPool, requestsManager: EthRequestsManager, connectionsListener: (WireConnection, Status) -> Unit = { _, _ -> })

Properties

connectionsListener

val connectionsListener: (WireConnection, Status) -> Unit

pendingTransactionsPool

val pendingTransactionsPool: TransactionPool

repository

val repository: BlockchainRepository

requestsManager

val requestsManager: EthRequestsManager

Functions

addNewBlock

suspend fun addNewBlock(newBlock: Block): Unit

addNewBlockBodies

suspend fun addNewBlockBodies(connection: WireConnection, requestIdentifier: Bytes?, bodies: List<BlockBody>): Unit

addNewBlockHashes

suspend fun addNewBlockHashes(hashes: List<Pair<Hash, Long>>): Unit

addNewBlockHeaders

suspend fun addNewBlockHeaders(connection: WireConnection, requestIdentifier: Bytes?, headers: List<BlockHeader>): Unit

addNewNodeData

suspend fun addNewNodeData(connection: WireConnection, requestIdentifier: Bytes?, elements: List<Bytes?>): Unit

addNewPooledTransactions

suspend fun addNewPooledTransactions(transactions: List<Transaction>): Unit

addNewTransactionReceipts

suspend fun addNewTransactionReceipts(connection: WireConnection, requestIdentifier: Bytes?, transactionReceipts: List<List<TransactionReceipt>>): Unit

addNewTransactions

suspend fun addNewTransactions(transactions: List<Transaction>): Unit

findBlockBodies

suspend fun findBlockBodies(hashes: List<Hash>): List<BlockBody>

findHeaders

suspend fun findHeaders(block: Bytes, maxHeaders: Long, skip: Long, reverse: Boolean): List<BlockHeader>

findNodeData

suspend fun findNodeData(hashes: List<Hash>): List<Bytes?>

findPooledTransactions

suspend fun findPooledTransactions(hashes: List<Hash>): List<Transaction>

findTransactionReceipts

suspend fun findTransactionReceipts(hashes: List<Hash>): List<List<TransactionReceipt>>

receiveStatus

fun receiveStatus(connection: WireConnection, status: Status): Unit

requestBlockHeader

fun requestBlockHeader(blockHash: Hash): Unit