Fix quorum (#700)

This commit is contained in:
KirillPamPam
2025-08-12 17:36:23 +04:00
committed by GitHub
parent a34f2186cc
commit 0063c89865
2 changed files with 3 additions and 8 deletions

View File

@@ -54,7 +54,6 @@ class ManagedCallMethods(
)
private val quorum: MutableMap<String, Factory<CallQuorum>> = HashMap()
private val staticResponse: MutableMap<String, String> = HashMap()
private val redefined = delegated.keys.filter(enabled::contains).associateWith { true }
init {
enabled.forEach { m ->
@@ -81,7 +80,7 @@ class ManagedCallMethods(
override fun createQuorumFor(method: String): CallQuorum {
return when {
isDelegated(method) && !isRedefined(method) -> delegate.createQuorumFor(method)
isDelegated(method) -> delegate.createQuorumFor(method)
allAllowed.contains(method) -> quorum[method]?.create() ?: defaultQuorum.create()
else -> {
log.warn("Getting quorum for unknown method - $method")
@@ -94,10 +93,6 @@ class ManagedCallMethods(
return delegated[method] ?: false
}
private fun isRedefined(method: String): Boolean {
return redefined[method] ?: false
}
override fun isCallable(method: String): Boolean {
return allAllowed.contains(method)
}