Skip to content

Commit

Permalink
change clone function
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Sep 25, 2023
1 parent 62c03fa commit fcd67a4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions observer/holder/nodesHolder.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,8 @@ func getNodesListAsString(nodes []*data.NodeData) string {
func cloneNodesSlice(input []*data.NodeData) []*data.NodeData {
clonedSlice := make([]*data.NodeData, len(input))
for idx, node := range input {
clonedSlice[idx] = &data.NodeData{
ShardId: node.ShardId,
Address: node.Address,
IsFallback: node.IsFallback,
IsSynced: node.IsSynced,
IsSnapshotless: node.IsSnapshotless,
}
clonedNodeData := *node
clonedSlice[idx] = &clonedNodeData
}

return clonedSlice
Expand Down

0 comments on commit fcd67a4

Please sign in to comment.