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

Add newtypes for BlockHeight/EpochLength/etc #215

Merged
merged 12 commits into from Feb 10, 2023

Conversation

SethDusek
Copy link
Collaborator

Closes #152

@coveralls
Copy link

coveralls commented Jan 11, 2023

Pull Request Test Coverage Report for Build 4134624236

  • 65 of 86 (75.58%) changed or added relevant lines in 15 files are covered.
  • 8 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 61.384%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/src/cli_commands/bootstrap.rs 7 8 87.5%
core/src/cli_commands/prepare_update.rs 5 6 83.33%
core/src/oracle_types.rs 4 6 66.67%
core/src/state.rs 0 2 0.0%
core/src/main.rs 0 4 0.0%
core/src/oracle_state.rs 0 4 0.0%
core/src/contracts/refresh.rs 22 29 75.86%
Files with Coverage Reduction New Missed Lines %
core/src/state.rs 1 0%
core/src/contracts/refresh.rs 3 75.38%
core/src/main.rs 4 0%
Totals Coverage Status
Change from base Build 4132092120: -0.1%
Covered Lines: 2022
Relevant Lines: 3294

💛 - Coveralls

@SethDusek SethDusek marked this pull request as ready for review February 3, 2023 09:02
@SethDusek
Copy link
Collaborator Author

Hmm, other than the coveralls pipeline failing (#225), this should be ready to review

Copy link
Member

@greenhat greenhat left a comment

Choose a reason for hiding this comment

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

Looking great! Thank you!

I think generic ergo types like BlockHeight will eventually make their way into the ergo-lib.

#[serde(transparent)]
pub struct BlockHeight(pub u32);

impl std::ops::Sub<EpochLength> for BlockHeight {
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@greenhat greenhat merged commit 2e745ff into ergoplatform:develop Feb 10, 2023
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.

[100 SigmaUSD] Newtypes for epoch id/counter, datapoint, height
3 participants