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

feat: reduce action type for the hashgraph #132

Merged
merged 23 commits into from
Sep 13, 2024

Conversation

JanLewDev
Copy link
Contributor

No description provided.

@JanLewDev JanLewDev marked this pull request as ready for review August 27, 2024 10:08
@JanLewDev JanLewDev marked this pull request as draft August 27, 2024 10:18
@JanLewDev JanLewDev marked this pull request as ready for review August 27, 2024 11:51
Copy link
Contributor

@h3lio5 h3lio5 left a comment

Choose a reason for hiding this comment

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

Good work on the PR!
Here's a possible optimization but otherwise LGTM:

switch (resolved.action) {
	case ActionType.Reduce:
	         let newOrder = [];
	         for (const idx of resolved.indices) {
		    if (idx === i) shouldIncrementI = false;
	            order[idx] = "";
		 }
		 for (const val of order) {
		     if (val != "") newOrder.push(val);
		 }
		 order = newOrder;
	         if (!shouldIncrementI) j = order.length; // Break out of inner loop
		 break;
	case ActionType.Nop:
		j++;
		break;
}

@d-roak d-roak linked an issue Aug 29, 2024 that may be closed by this pull request
@d-roak
Copy link
Member

d-roak commented Sep 10, 2024

resolve the conflicts after #138 is merged

@h3lio5
Copy link
Contributor

h3lio5 commented Sep 13, 2024

lgtm!

Copy link
Member

@d-roak d-roak left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@guiltygyoza guiltygyoza left a comment

Choose a reason for hiding this comment

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

lgtm

@d-roak d-roak merged commit 6198600 into topology-foundation:main Sep 13, 2024
5 checks passed
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.

Allow multi-vertex semantics
4 participants