Skip to content

process consignment: handle attachment assignments#212

Merged
dr-orlovsky merged 1 commit intoRGB-WG:masterfrom
zoedberg:process_attachment_assignments
Nov 15, 2022
Merged

process consignment: handle attachment assignments#212
dr-orlovsky merged 1 commit intoRGB-WG:masterfrom
zoedberg:process_attachment_assignments

Conversation

@zoedberg
Copy link
Member

@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 oacdutra 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
Member 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 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.

2 participants