2733
func (n *Node) ApplySnapshot(
2734
incomingSnapshot NodesSnapshot,
2736
>
currentSnapshot := n.Snapshot(nil)
2737
>
2738
>
mutation := NodesMutation{
2739
>
UpdatedNodes: make(map[string]*persistencespb.ChasmNode),
2740
>
DeletedNodes: make(map[string]struct{}),
2741
>
}
2742
>
2743
>
for encodedPath := range currentSnapshot.Nodes {
2744
>
if _, ok := incomingSnapshot.Nodes[encodedPath]; !ok {
2745
>
mutation.DeletedNodes[encodedPath] = struct{}{}
2746
>
}
2747
}
2748
2749
>
for encodedPath, incomingNode := range incomingSnapshot.Nodes {
tree.go
2750
currentNode, ok := currentSnapshot.Nodes[encodedPath]
2751
if !ok {