update docs (#348)

This commit is contained in:
a10zn8
2023-11-23 00:08:01 +03:00
committed by GitHub
parent 5a154ac817
commit 138e5d3eb3
13 changed files with 148 additions and 468 deletions

View File

@@ -23,16 +23,23 @@ class EthereumUpstreamCreator(
options: ChainOptions.Options,
chainConf: ChainsConfig.ChainConfig,
): Upstream? {
val posConn = upstreamsConfig.cast(UpstreamsConfig.EthereumPosConnection::class.java)
var rating = 0
val connection = if (upstreamsConfig.connection is UpstreamsConfig.EthereumPosConnection) {
val posConn = upstreamsConfig.cast(UpstreamsConfig.EthereumPosConnection::class.java)
rating = posConn.connection?.upstreamRating ?: 0
posConn.connection?.execution
} else {
upstreamsConfig.cast(UpstreamsConfig.RpcConnection::class.java).connection
}
return buildGenericUpstream(
upstreamsConfig.nodeId,
upstreamsConfig,
posConn.connection?.execution ?: throw IllegalStateException("Empty execution config"),
connection ?: throw IllegalStateException("Empty execution config"),
chain,
options,
chainConf,
posConn.connection?.upstreamRating ?: 0,
rating,
)
}
}

View File

@@ -74,7 +74,7 @@ open class GenericMultistream(
upstreams.add(u as GenericUpstream)
}
private var head: DynamicMergedHead = DynamicMergedHead(
private val head: DynamicMergedHead = DynamicMergedHead(
PriorityForkChoice(),
"Multistream of ${chain.chainCode}",
headScheduler,