diff --git a/zebra-chain/src/sapling/commitment.rs b/zebra-chain/src/sapling/commitment.rs index cc099d1a..9c806909 100644 --- a/zebra-chain/src/sapling/commitment.rs +++ b/zebra-chain/src/sapling/commitment.rs @@ -187,6 +187,14 @@ impl From for [u8; 32] { } } +impl<'a> std::ops::Sub<&'a ValueCommitment> for ValueCommitment { + type Output = Self; + + fn sub(self, rhs: &'a ValueCommitment) -> Self::Output { + self - *rhs + } +} + impl std::ops::Sub for ValueCommitment { type Output = Self;