solution: warn if WS is not configured for an upstream
This commit is contained in:
@@ -88,13 +88,15 @@ open class EthereumUpstream(
|
|||||||
val ws = EthereumWsHead(ethereumWs).apply {
|
val ws = EthereumWsHead(ethereumWs).apply {
|
||||||
this.start()
|
this.start()
|
||||||
}
|
}
|
||||||
val rpc = EthereumRpcHead(api, Duration.ofSeconds(20)).apply {
|
// receive bew blocks through Websockets, but periodically verify with RPC
|
||||||
|
val rpc = EthereumRpcHead(api, Duration.ofSeconds(30)).apply {
|
||||||
this.start()
|
this.start()
|
||||||
}
|
}
|
||||||
EthereumHeadMerge(listOf(rpc.getFlux(), ws.getFlux())).apply {
|
EthereumHeadMerge(listOf(rpc.getFlux(), ws.getFlux())).apply {
|
||||||
this.start()
|
this.start()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
log.warn("Setting up upstream $id with RPC-only access, less effective than WS+RPC")
|
||||||
EthereumRpcHead(api).apply {
|
EthereumRpcHead(api).apply {
|
||||||
this.start()
|
this.start()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user