From 7f57cec951e2851d68d4853c50d9918f1f9ae66d Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Fri, 21 Jul 2023 18:45:46 -0500 Subject: [PATCH] Fix bug where the defensive copy loses the computed leaf paths. --- 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 } -- 2.45.2