batcher: ensure removal from batcher

Fixes #2924

Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc>
This commit is contained in:
Kristoffer Dalby 2025-12-16 18:31:14 +00:00
parent 5c6cd62df1
commit f3767dddf8
3 changed files with 178 additions and 4 deletions

View file

@ -478,7 +478,9 @@ func (s *State) DeleteNode(node types.NodeView) (change.Change, error) {
}
if !policyChange.IsEmpty() {
c = policyChange
// Merge policy change with NodeRemoved to preserve PeersRemoved info
// This ensures the batcher cleans up the deleted node from its state
c = c.Merge(policyChange)
}
return c, nil