Poll rpc heads using expected-block-time (#338)

This commit is contained in:
KirillPamPam
2023-11-10 13:18:08 +04:00
committed by GitHub
parent ef48f8c89f
commit e5f844b091
2 changed files with 80 additions and 1 deletions

View File

@@ -62,7 +62,15 @@ class GenericRpcConnector(
head = when (connectorType) {
RPC_ONLY -> {
log.warn("Setting up connector for $id upstream with RPC-only access, less effective than WS+RPC")
GenericRpcHead(getIngressReader(), forkChoice, id, blockValidator, headScheduler, chainSpecific)
GenericRpcHead(
getIngressReader(),
forkChoice,
id,
blockValidator,
headScheduler,
chainSpecific,
expectedBlockTime.coerceAtLeast(Duration.ofSeconds(1)),
)
}
WS_ONLY -> {