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(rebuild): functions with unit tests #105
Conversation
}); | ||
it("should be able to keyValidate PublicKey", () => { | ||
const agg = aggregatePublicKeys(keys); | ||
expect(agg.keyValidate()).to.be.undefined; |
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.
key validate would through on invalid ? in that case check for not throw
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.
It is impossible to deserialize an invalid PublicKey with the blst
library. It will throw when creating the point before aggregation. I added an error check for invalid key though. Will that work?
feat(rebuild): fixes from implementation into lodestar
test(rebuild): add spec tests
Sync and Async version of rebuilt functions. No helper classes were used.
How to test
cd rebuild yarn yarn test:unit