Skip to content

Commit

Permalink
Merge pull request #1514 from nuttycom/fix/remove_blockheight_addition
Browse files Browse the repository at this point in the history
zcash_protocol: Remove impl {Add, Sub} for BlockHeight
  • Loading branch information
nuttycom authored Aug 26, 2024
2 parents dbc77df + 8259825 commit 21399ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
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

0 comments on commit 21399ec

Please sign in to comment.