LESSubprotocol(coroutineContext: CoroutineContext = Dispatchers.Default, blockchainInfo: BlockchainInformation, serveHeaders: Boolean, serveChainSince: UInt256, serveStateSince: UInt256, flowControlBufferLimit: UInt256, flowControlMaximumRequestCostTable: UInt256, flowControlMinimumRateOfRecharge: UInt256, repo: BlockchainRepository, pendingTransactionsPool: TransactionPool, connectionSelectionStrategy: ConnectionSelectionStrategy, listener: (WireConnection, Status) -> Unit = { _, _ -> })
The LES subprotocol entry point class, to be used in conjunction with RLPxService
This subprotocol is implemented after the specification presented on the * Ethereum wiki.
coroutineContext
- the Kotlin coroutine context
blockchainInfo
- blockchain information to send to peers
serveHeaders
- whether to serve headers
serveChainSince
- block number at which to start serving blocks
serveStateSince
- block number at which to start serving state
flowControlBufferLimit
- limit of bytes to send
flowControlMaximumRequestCostTable
- cost table for control flow
flowControlMinimumRateOfRecharge
- rate of recharge for cost
repo
- the blockchain repository this subprotocol will serve data from
listener
- a listener for new connections when a status message is provided
See Also