zcash_protocol: Remove impl {Add, Sub} for BlockHeight

These operations are unused, and block heights form a vector space,
not a monoid.
This commit is contained in:
Kris Nuttycombe 2024-08-25 10:02:33 -06:00
parent 4b70940431
commit 8259825d64
2 changed files with 4 additions and 16 deletions

View File

@ -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}`

View File

@ -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;
@ -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].