-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: reduce action type for the hashgraph #132
Conversation
There was a problem hiding this 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;
}
resolve the conflicts after #138 is merged |
lgtm! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.