diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt index 451a53b4..0f967fba 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt @@ -98,6 +98,11 @@ abstract class DefaultUpstream( } fun statusByLag(lag: Long, proposed: UpstreamAvailability): UpstreamAvailability { + if (options.disableValidation == true) { + // if we specifically told that this upstream should be _always valid_ then skip + // the status calculation and trust the proposed value as is + return proposed + } return if (proposed == UpstreamAvailability.OK) { when { lag > 6 -> UpstreamAvailability.SYNCING