Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add new auxiliary functions for CCU #7743

Merged
merged 5 commits into from
Nov 9, 2022

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Nov 4, 2022

What was the problem?

This PR resolves #7723

How was it solved?

  • Add auxiliary functions in stores and internal method to use them
  • Update messageWitness to messageWitnessHashes for inbox
  • Fix misusage of mock in unit tests

How was it tested?

Added unit tests for stores and internal method

@shuse2 shuse2 self-assigned this Nov 4, 2022
Copy link
Contributor

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

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

🚀

framework/test/unit/modules/interoperability/utils.spec.ts Outdated Show resolved Hide resolved
currentValidator.bftWeight = updatedValidator.bftWeight;
} else {
activeValidators.push(updatedValidator);
activeValidators.sort((v1, v2) => v1.blsKey.compare(v2.blsKey));
Copy link
Contributor

Choose a reason for hiding this comment

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

activeValidators.sort((v1, v2) => v1.blsKey.compare(v2.blsKey));
doesn't need to be inside loop (not good for performance reasons), so it could be just before return activeValidators;

@shuse2 shuse2 merged commit 8b3ed53 into feature/7211-interop-module-updates Nov 9, 2022
@shuse2 shuse2 deleted the 7723-add_util_func branch November 9, 2022 11:07
ishantiw added a commit that referenced this pull request Nov 14, 2022
### What was the problem?

This PR resolves #7723 

### How was it solved?

- Add auxiliary functions in stores and internal method to use them
- Update `messageWitness` to `messageWitnessHashes` for inbox
- Fix misusage of mock in unit tests

### How was it tested?

Added unit tests for stores and internal method

Co-authored-by: !shan <[email protected]>
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.

3 participants