Add note about whether sign checks in Amount -> Fr conversion matter

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
This commit is contained in:
Deirdre Connolly 2020-08-10 19:42:34 -04:00 committed by Deirdre Connolly
parent 75cad3bb0a
commit 52a10d2837
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ impl From<Amount<NonNegative>> for u64 {
impl<C> From<Amount<C>> for jubjub::Fr {
fn from(a: Amount<C>) -> jubjub::Fr {
// TODO: this isn't constant time -- does that matter?
if a.0 < 0 {
jubjub::Fr::from(a.0.abs() as u64).neg()
} else {