From 52a10d28370beb5d99c28cc9ecd33e12f95b430a Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Mon, 10 Aug 2020 19:42:34 -0400 Subject: [PATCH] Add note about whether sign checks in Amount -> Fr conversion matter Co-authored-by: Henry de Valence --- zebra-chain/src/types/amount.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zebra-chain/src/types/amount.rs b/zebra-chain/src/types/amount.rs index 3747a05e6..b6c0ed85a 100644 --- a/zebra-chain/src/types/amount.rs +++ b/zebra-chain/src/types/amount.rs @@ -134,6 +134,7 @@ impl From> for u64 { impl From> for jubjub::Fr { fn from(a: Amount) -> 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 {