From cb94c9b8b76986c66d38419acb95e66232457265 Mon Sep 17 00:00:00 2001 From: yzxcj797 <1784931579@qq.com> Date: Sat, 22 Aug 2026 13:54:30 +0800 Subject: [PATCH] mixclient: remove shadowed roots declaration. The receiveOwnRoots loop declared a fresh inner 'roots' (capacity sesRun.mtot) that shadowed the outer 'roots' which had just been reset with roots[:0], and guarded it with a comparison against the new slice's length, which is always zero and therefore dead. Remove the shadowing declaration and the dead check so the loop appends to the reset outer slice and the return at the bottom of the loop hands back the same slice that was built, as intended. Fixes #3777. --- mixing/mixclient/client.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mixing/mixclient/client.go b/mixing/mixclient/client.go index aa2fa1b782..893ceec558 100644 --- a/mixing/mixclient/client.go +++ b/mixing/mixclient/client.go @@ -2184,10 +2184,6 @@ func (c *Client) roots(ctx context.Context, seenSRs []chainhash.Hash, if len(fp.Roots) != len(a)-1 { continue } - roots := make([]*big.Int, 0, sesRun.mtot) - if len(fp.Roots) <= len(roots) { - continue - } for i := range fp.Roots { root := new(big.Int).SetBytes(fp.Roots[i])