impl From<Amount> for orchard::ValueSum
This is necessary in order to be able to calculate bvk for Orchard bundles.
This commit is contained in:
parent
cc533a9da4
commit
00b3e427e6
|
@ -182,6 +182,12 @@ impl Neg for Amount {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<Amount> for orchard::ValueSum {
|
||||||
|
fn from(v: Amount) -> Self {
|
||||||
|
orchard::ValueSum::from_raw(v.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl TryFrom<orchard::ValueSum> for Amount {
|
impl TryFrom<orchard::ValueSum> for Amount {
|
||||||
type Error = ();
|
type Error = ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue