8000 add disable-bound-validation option by tonatoz · Pull Request #675 · drpcorg/dshackle · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add disable-bound-validation option #675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Si 8000 gn in to your account

Merged
merged 2 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10000
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ChainOptions {
val validateChain: Boolean,
val callLimitSize: Int,
val disableLivenessSubscriptionValidation: Boolean,
val disableBoundValidation: Boolean = false,
)

data class DefaultOptions(
Expand All @@ -38,6 +39,7 @@ class ChainOptions {
var validateChain: Boolean? = null,
var callLimitSize: Int? = null,
var disableLivenessSubscriptionValidation: Boolean? = null,
var disableBoundValidation: Boolean? = null,
) {
companion object {
@JvmStatic
Expand Down Expand Up @@ -67,6 +69,7 @@ class ChainOptions {
overwrites.disableUpstreamValidation ?: this.disableUpstreamValidation
copy.callLimitSize = overwrites.callLimitSize ?: this.callLimitSize
copy.disableLivenessSubscriptionValidation = overwrites.disableLivenessSubscriptionValidation ?: this.disableLivenessSubscriptionValidation
copy.disableBoundValidation = overwrites.disableBoundValidation ?: this.disableBoundValidation
return copy
}

Expand All @@ -85,6 +88,7 @@ class ChainOptions {
this.validateChain ?: true,
this.callLimitSize ?: 1_000_000,
this.disableLivenessSubscriptionValidation ?: false,
this.disableBoundValidation ?: false,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class ChainOptionsReader : YamlConfigReader<ChainOptions.PartialOptions>() {
getValueAsBool(values, "disable-liveness-subscription-validation")?.let {
options.disableLivenessSubscriptionValidation = it
}
getValueAsBool(values, "disable-bound-validation")?.let {
options.disableBoundValidation = it
}
return options
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ open class GenericUpstream(
}
detectSettings()

detectLowerBlock()
if (!getOptions().disableBoundValidation) {
detectLowerBlock()
}

detectFinalization()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ class UpstreamsConfigReaderSpec extends Specification {
def options = partialOptions.buildOptions()
then:
options == new ChainOptions.Options(
false, false, 30, Duration.ofSeconds(60), null, true, 1, true, true, true, true, 1_000_000, false
false, false, 30, Duration.ofSeconds(60), null, true, 1, true, true, true, true, 1_000_000, false, false
)
}
}
Loading
0