ElementsProject / rust-elements

Rust support for Elements transaction/block deserialization
Creative Commons Zero v1.0 Universal
52 stars 33 forks source link

Add utility methods to create pegin witnesses #144

Closed stevenroose closed 2 years ago

stevenroose commented 2 years ago

This is a breaking change only in the field of the asset. I thought it made more sense like that, but if we prefer to not make breaking changes, the utility methods could also be added without the field change.

stevenroose commented 2 years ago

Even though this seems to pass unit tests, I'm personally experiencing some issues with the assetid not roundtripping correctly. I'll try remember posting an update when I have that figured out.

apoelstra commented 2 years ago

Ok, will hold off on reviewing until then. If it turns out to a bug please add a unit test :)

stevenroose commented 2 years ago

Ah damn I had this comment written but didn't submit yet..

Ok, nevermind; the issue was on my side because I copied over the impls but I ofc still had the old field type so it was serializing the confidential asset with prefix and trying to deserialize just the plain asset id.

It should be good to go now