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

remove byteorder dependency #807

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Alesfatalis
Copy link
Contributor

closes #806

@Alesfatalis Alesfatalis requested a review from SethDusek January 19, 2025 11:34
Copy link
Collaborator

@SethDusek SethDusek left a comment

Choose a reason for hiding this comment

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

I'm fine with removing a dependency but why would byteorder cause issues in no_std? ergo-lib doesn't depend on it and ergo-nipoopow/chain-generation don't support no_std anyway

ergo-nipopow/src/autolykos_pow_scheme.rs Outdated Show resolved Hide resolved
ergo-nipopow/src/autolykos_pow_scheme.rs Outdated Show resolved Hide resolved
ergo-nipopow/src/autolykos_pow_scheme.rs Outdated Show resolved Hide resolved
ergo-chain-generation/src/chain_generation.rs Outdated Show resolved Hide resolved
ergo-chain-generation/src/chain_generation.rs Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jan 19, 2025

Pull Request Test Coverage Report for Build 12853612527

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 13 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.09%) to 78.483%

Files with Coverage Reduction New Missed Lines %
ergo-p2p/src/peer_spec.rs 1 84.38%
ergo-p2p/src/peer_feature.rs 2 90.32%
ergotree-ir/src/serialization/types.rs 10 79.72%
Totals Coverage Status
Change from base Build 12853076213: -0.09%
Covered Lines: 11099
Relevant Lines: 14142

💛 - Coveralls

@Alesfatalis Alesfatalis force-pushed the i806-remove-byteorder branch from a4c408f to 022e51e Compare January 19, 2025 12:27
@Alesfatalis
Copy link
Contributor Author

I'm fine with removing a dependency but why would byteorder cause issues in no_std? ergo-lib doesn't depend on it and ergo-nipoopow/chain-generation don't support no_std anyway

ergo-lib was depending on byteorder as workspace dependency and that was imported with default features on (requiring std). Instead of separating imports I opted to completely remove the dependency

@Alesfatalis Alesfatalis force-pushed the i806-remove-byteorder branch from 6145182 to f5447d2 Compare January 19, 2025 12:39
let mut height_bytes = Vec::with_capacity(4);
#[allow(clippy::unwrap_used)]
height_bytes.write_u32::<BigEndian>(header.height).unwrap();
let height_bytes = header.height.to_be_bytes().to_vec();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you remove to_vec here as well?

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.

Remove byteorder dependency
3 participants