From 8d171e83e77ad52a12e3cc0db1681b0c4c7cb317 Mon Sep 17 00:00:00 2001 From: a10zn8 Date: Tue, 27 Feb 2024 17:42:12 +0300 Subject: [PATCH] review fixes --- .../io/emeraldpay/dshackle/upstream/DefaultNearMethods.kt | 7 +++---- .../dshackle/upstream/near/NearLowerBoundBlockDetector.kt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultNearMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultNearMethods.kt index 3853c1d2..2416c026 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultNearMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultNearMethods.kt @@ -32,11 +32,10 @@ class DefaultNearMethods : CallMethods { private val allowedMethods: Set = all + add override fun createQuorumFor(method: String): CallQuorum { - return when { - add.contains(method) -> BroadcastQuorum() - all.contains(method) -> AlwaysQuorum() - else -> AlwaysQuorum() + if (add.contains(method)) { + return BroadcastQuorum() } + return AlwaysQuorum() } override fun isCallable(method: String): Boolean { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/near/NearLowerBoundBlockDetector.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/near/NearLowerBoundBlockDetector.kt index a7d162d7..72b9e92f 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/near/NearLowerBoundBlockDetector.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/near/NearLowerBoundBlockDetector.kt @@ -21,6 +21,6 @@ class NearLowerBoundBlockDetector( } override fun periodRequest(): Long { - return 120 + return 3 } }