From 84cb3b705e2d0e43dbf728ca81799f931d612444 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Fri, 21 Jul 2023 18:46:18 -0500 Subject: [PATCH] Fix bug where the defensive copy loses the computed leaf paths. (#401) --- statediff/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/statediff/config.go b/statediff/config.go index 8f5c718ae..83e83da7b 100644 --- a/statediff/config.go +++ b/statediff/config.go @@ -88,9 +88,9 @@ type ParamsWithMutex struct { // CopyParams returns a defensive copy of the Params func (p *ParamsWithMutex) CopyParams() Params { p.RLock() - defer p.RUnlock() - copy := p.Params.Copy() + p.RUnlock() + copy.ComputeWatchedAddressesLeafPaths() return copy }