Why sort links in pbnode

In the implementation of merkledag, the dag node will be serialized as protobuf node(PBNode). I saw in the code, the links are sorted:

sort.Stable(LinkSlice(n.links))

But the question is when we add a big file, the file will be split into multiple nodes that linked together. If the order of the links are changed by sorting, how can we make sure get the correct order of file pieces?

Thanks!

We sort by names and chunk nodes aren’t named (so the stable sort doesn’t move anything).

I got it! Thanks a lot !

1 - Is there any way to store links without sorting ?
I try to store links in reverse order and I’m facing this behaviour.
2 - What are the motivations to sort the links at the server level ?
Thanks