ethereum pos doc and some config naming
This commit is contained in:
@@ -102,7 +102,7 @@ open class UpstreamsConfig {
|
||||
var host: String? = null
|
||||
var port: Int = 0
|
||||
var auth: AuthConfig.ClientTlsAuth? = null
|
||||
var nodeRating: Int = 0
|
||||
var upstreamRating: Int = 0
|
||||
}
|
||||
|
||||
class EthereumConnection : RpcConnection() {
|
||||
@@ -117,7 +117,7 @@ open class UpstreamsConfig {
|
||||
|
||||
class EthereumPosConnection : UpstreamConnection() {
|
||||
var execution: EthereumConnection? = null
|
||||
var blockPriority: Int = 0
|
||||
var upstreamRating: Int = 0
|
||||
}
|
||||
|
||||
data class BitcoinZeroMq(
|
||||
|
||||
@@ -107,7 +107,7 @@ class UpstreamsConfigReader(
|
||||
val connection = UpstreamsConfig.GrpcConnection()
|
||||
upstream.connection = connection
|
||||
getValueAsInt(connConfigNode, "node-rating")?.let {
|
||||
connection.nodeRating = it
|
||||
connection.upstreamRating = it
|
||||
}
|
||||
getValueAsString(connConfigNode, "host")?.let {
|
||||
connection.host = it
|
||||
@@ -170,8 +170,8 @@ class UpstreamsConfigReader(
|
||||
getMapping(connConfigNode, "execution")?.let {
|
||||
connection.execution = readEthereumConnection(it)
|
||||
}
|
||||
getValueAsInt(connConfigNode, "block-priority")?.let {
|
||||
connection.blockPriority = it
|
||||
getValueAsInt(connConfigNode, "node-rating")?.let {
|
||||
connection.upstreamRating = it
|
||||
}
|
||||
return connection
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ open class ConfiguredUpstreams(
|
||||
return null
|
||||
}
|
||||
val urls = ArrayList<URI>()
|
||||
val connectorFactory = buildEthereumConnectorFactory(execution, chain, urls, NoChoiceWithPriorityForkChoice(conn.blockPriority))
|
||||
val connectorFactory = buildEthereumConnectorFactory(execution, chain, urls, NoChoiceWithPriorityForkChoice(conn.upstreamRating))
|
||||
val methods = buildMethods(config, chain)
|
||||
if (connectorFactory == null) {
|
||||
return null
|
||||
@@ -256,7 +256,7 @@ open class ConfiguredUpstreams(
|
||||
endpoint.port,
|
||||
endpoint.auth,
|
||||
fileResolver,
|
||||
endpoint.nodeRating
|
||||
endpoint.upstreamRating
|
||||
).apply {
|
||||
timeout = options.timeout
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user