From c72b45fab4d0d759bc86af2d2451cfde3b7c15e9 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Fri, 21 Jul 2023 18:42:07 -0500 Subject: [PATCH] Fix bug where the defensive copy loses the computed leaf paths. (#400) --- statediff/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/statediff/config.go b/statediff/config.go index dc2604e2b..8f5c718ae 100644 --- a/statediff/config.go +++ b/statediff/config.go @@ -90,7 +90,9 @@ func (p *ParamsWithMutex) CopyParams() Params { p.RLock() defer p.RUnlock() - return p.Params.Copy() + copy := p.Params.Copy() + copy.ComputeWatchedAddressesLeafPaths() + return copy } // Args bundles the arguments for the state diff builder