From 455320a510b04a636638439fb4471b10e4c43c55 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 d08d119db..4736a9e9f 100644 --- a/dht_options.go +++ b/dht_options.go @@ -92,6 +92,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 }