tuweni / org.apache.tuweni.ethclient / Synchronizer

Synchronizer

abstract class Synchronizer : CoroutineScope (source)

Constructors

<init>

Synchronizer(executor: ExecutorService = Executors.newFixedThreadPool(1), coroutineContext: CoroutineContext = executor.asCoroutineDispatcher(), repository: BlockchainRepository, client: EthRequestsManager, peerRepository: EthereumPeerRepository)

Properties

client

val client: EthRequestsManager

coroutineContext

open val coroutineContext: CoroutineContext

executor

val executor: ExecutorService

peerRepository

val peerRepository: EthereumPeerRepository

repository

val repository: BlockchainRepository

Functions

addHeaders

fun addHeaders(result: List<BlockHeader>): Unit

start

abstract fun start(): Unit

stop

abstract fun stop(): Unit

Inheritors

FromBestBlockSynchronizer

class FromBestBlockSynchronizer : Synchronizer

FromUnknownParentSynchronizer

class FromUnknownParentSynchronizer : Synchronizer

PeerStatusEthSynchronizer

Synchronizer responsible for pulling blocks until such time the highest known block is met, or close enough.

class PeerStatusEthSynchronizer : Synchronizer