tuweni / org.apache.tuweni.eth.crawler / EthstatsDataRepository

EthstatsDataRepository

class EthstatsDataRepository : CoroutineScope (source)

Constructors

<init>

EthstatsDataRepository(ds: DataSource, coroutineContext: CoroutineContext = Dispatchers.Default)

Properties

coroutineContext

val coroutineContext: CoroutineContext

ds

val ds: DataSource

Functions

getLatestBlock

fun getLatestBlock(id: String): Deferred<BlockStats?>

getPeerData

fun getPeerData(id: String): Deferred<PeerData?>

storeBlock

fun storeBlock(remoteAddress: String, id: String, block: BlockStats): Deferred<Boolean>

storeLatency

fun storeLatency(remoteAddress: String, id: String, latency: Long): Deferred<Boolean>

storeNodeInfo

fun storeNodeInfo(remoteAddress: String, id: String, nodeInfo: NodeInfo): Deferred<Boolean>

storeNodeStats

fun storeNodeStats(remoteAddress: String, id: String, nodeStats: NodeStats): Deferred<Boolean>

storePendingTx

fun storePendingTx(remoteAddress: String, id: String, pendingTx: Long): Deferred<Boolean>

updateDisconnect

fun updateDisconnect(remoteAddress: String, id: String): Deferred<Boolean>