Closed wellcaffeinated closed 6 months ago
@vmx do we not sort maps when it comes from a struct? It should be the first of these encodings for both cases.
Thanks for the bug report and the test to reproduce it. I can see where the problem is, I'm working on a fix, which hopefully also catches all other cases.
Fantastic! Thanks for the quick turnaround.
Hey there. I've been using the ipld/dag-cbor library to encode my data.
I just tried using this crate to encode the same data and noticed that it encodes it in the order the struct is declared in.
Here's a test you can run:
it fails with: