Aleph main (#536)

This commit is contained in:
KirillPamPam
2024-07-30 19:00:15 +04:00
committed by GitHub
parent 358ef7d83a
commit 6b249a3e15
3 changed files with 6 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ class GenericRpcConnector(
} }
} }
liveness = if (connectorType != RPC_ONLY && (chain == Chain.OPEN_CAMPUS_CODEX__SEPOLIA || chain == Chain.ALEPHZERO__SEPOLIA || chain == Chain.CONNEXT__SEPOLIA)) { liveness = if (connectorType != RPC_ONLY && isSpecialChain(chain)) {
AlwaysHeadLivenessValidator() AlwaysHeadLivenessValidator()
} else { } else {
when (connectorType) { when (connectorType) {
@@ -139,6 +139,9 @@ class GenericRpcConnector(
} }
} }
private fun isSpecialChain(chain: Chain) =
chain == Chain.OPEN_CAMPUS_CODEX__SEPOLIA || chain == Chain.ALEPHZERO__SEPOLIA || chain == Chain.CONNEXT__SEPOLIA || chain == Chain.ALEPHZERO__MAINNET
override fun setCaches(caches: Caches) { override fun setCaches(caches: Caches) {
if (head is CachesEnabled) { if (head is CachesEnabled) {
head.setCaches(caches) head.setCaches(caches)