Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

process consignment: handle attachment assignments #212

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

zoedberg
Copy link
Contributor

@zoedberg zoedberg commented Nov 9, 2022

This fix is needed in order to support assignments of type Assignment<AttachmentStrategy>

@zoedberg zoedberg requested a review from crisdut November 9, 2022 08:30
@dr-orlovsky
Copy link
Member

Can you please provide a bit more details why the existing code doesn't work?

@zoedberg
Copy link
Contributor Author

zoedberg commented Nov 9, 2022

The existing code works well with Value assignments, this fix is needed in order to process transfers with Attachment assignments, that are currently used in RGB21 schema for engraving.

@dr-orlovsky
Copy link
Member

Thank you. Now it all makes sense to me. I think we also need to support the remaining data types. I will merge this for now not to postpone this fix further and will open an issue.

Copy link
Member

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fe2ccd9

let mut assignment: Vec<Assignment<PedersenStrategy>> =
empty!();

for out in outpoints.clone() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be more efficient to remove clone here and put in in just a single branch which takes the ownership below (the other branch doesn't need to do the clone).

let mut assignment: Vec<Assignment<AttachmentStrategy>> =
empty!();

for out in outpoints.clone() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ibid

@dr-orlovsky dr-orlovsky merged commit ae4da21 into RGB-WG:master Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants