Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: localstate query utxo by address' transactionoutput #386

Merged

Conversation

falcucci
Copy link
Contributor

fixes #385

- implement minicbor `decode` and `encode` for `transactionoutput`.
- change `utxo` field type from `keyvaluepairs<utxo, values>` to `keyvaluepairs<utxo, transactionoutput>` in `utxobyaddress` struct.
- replace `values` struct with `postalonsotransactionoutput` struct and `legacytransactionoutput` struct as the elements of a new enum, `transactionoutput`.
- add a new field `script_ref` to `postalonsotransactionoutput` struct.
- add a new field `datum_hash` to `legacytransactionoutput` struct.
@falcucci falcucci marked this pull request as ready for review January 25, 2024 19:38
@falcucci falcucci changed the title fix: localstate query utxo by address' transactionoutput and update related structs fix: localstate query utxo by address' transactionoutput Jan 25, 2024
- refactored `values` to `transactionoutput::map` in local state queries of version 16
- added `script_ref` field to `postalonsotransactionoutput` and set it to `none` in the test cases.
- renamed the `transactionoutput` enum variants from `map` to `current` and `array` to `legacy`.
- updated the corresponding usage of these enum variants in encoding and decoding in `codec.rs`.
- reflected these changes in the `transactionoutput` type creations in `protocols.rs` test file.
@scarmuega scarmuega merged commit 3a0514c into txpipe:main Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

local state query UTxOByAddress isn't compatible with legacy output transactions
2 participants