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

Network technical debt input validation #263

Merged
merged 24 commits into from
Nov 20, 2023

Conversation

rodolfopietro97
Copy link
Contributor

Standardise the way to validate inputs with assertInput function instead of if(condition) throw buildError(...)

@rodolfopietro97 rodolfopietro97 marked this pull request as draft November 17, 2023 15:06
Copy link

github-actions bot commented Nov 17, 2023

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 100%
100% (1094/1094) 100% (261/261) 100% (218/218)
Title Tests Skipped Failures Errors Time
core 319 0 💤 0 ❌ 0 🔥 1m 21s ⏱️
network 71 0 💤 0 ❌ 0 🔥 46.15s ⏱️
errors 30 0 💤 0 ❌ 0 🔥 9.75s ⏱️

@rodolfopietro97 rodolfopietro97 marked this pull request as ready for review November 20, 2023 10:08
@rodolfopietro97 rodolfopietro97 linked an issue Nov 20, 2023 that may be closed by this pull request
Copy link
Member

@fabiorigam fabiorigam left a comment

Choose a reason for hiding this comment

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

LGTM but I would add a small paragraph on CONTRIBUTING to explain this

Copy link
Member

@pierobassa pierobassa left a comment

Choose a reason for hiding this comment

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

Nice! Left a minor consideration on how conditions are specified in the asserts

packages/core/src/certificate/certificate.ts Outdated Show resolved Hide resolved
packages/core/src/certificate/certificate.ts Outdated Show resolved Hide resolved
packages/core/src/certificate/certificate.ts Outdated Show resolved Hide resolved
packages/core/src/encoding/rlp/helpers/numerickind.ts Outdated Show resolved Hide resolved
packages/core/src/encoding/rlp/helpers/numerickind.ts Outdated Show resolved Hide resolved
packages/core/src/encoding/rlp/helpers/numerickind.ts Outdated Show resolved Hide resolved
@rodolfopietro97
Copy link
Contributor Author

rodolfopietro97 commented Nov 20, 2023

@pierobassa All conditions are corrected. Please take a look, 4 eyes are better than one.
This is the commit:
8dc0357

@fabiorigam I also added stuff in contributing.md

@rodolfopietro97 rodolfopietro97 merged commit 7745922 into main Nov 20, 2023
9 checks passed
@rodolfopietro97 rodolfopietro97 deleted the network-technical-debt-input-validation branch November 20, 2023 16:11
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.

Improve validation of input
3 participants