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

zcash_protocol: Remove impl {Add, Sub} for BlockHeight #1514

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/zcash_protocol/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this library adheres to Rust's notion of

## [Unreleased]

### Removed
- `impl {Add, Sub} for BlockHeight` - these operations were unused, and block
heights are a vector space, not a monoid.

## [0.2.0] - 2024-08-19
### Added
- `zcash_protocol::PoolType::{TRANSPARENT, SAPLING, ORCHARD}`
Expand Down
16 changes: 0 additions & 16 deletions components/zcash_protocol/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,6 @@ impl Add<u32> for BlockHeight {
}
}

impl Add for BlockHeight {
type Output = Self;

fn add(self, other: Self) -> Self {
self + other.0
}
}

impl Sub<u32> for BlockHeight {
type Output = Self;

Expand All @@ -127,14 +119,6 @@ impl Sub<u32> for BlockHeight {
}
}

impl Sub for BlockHeight {
type Output = Self;

fn sub(self, other: Self) -> Self {
self - other.0
}
}

/// Constants associated with a given Zcash network.
pub trait NetworkConstants: Clone {
/// The coin type for ZEC, as defined by [SLIP 44].
Expand Down
Loading