From 57ffb5388ee08a8842eeb271f5749287840bec41 Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Wed, 22 Apr 2020 19:33:48 -0400 Subject: [PATCH] if the DisableValues is passed then set the validator internally to nil --- dht_options.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dht_options.go b/dht_options.go index bd3523d67..8082c225f 100644 --- a/dht_options.go +++ b/dht_options.go @@ -91,6 +91,10 @@ func (c *config) applyFallbacks(h host.Host) error { return fmt.Errorf("the default validator was changed without being marked as changed") } } + + if !c.enableValues { + c.validator = nil + } return nil }