aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-23 11:59:12 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-23 11:59:12 +0200
commit0774fd7020a4f70beb13ddf668686c44f8ebb84c (patch)
tree6caac9d24c4d566fd06f2ab177549e5b4a585106
parent727eccbe644aede46ef5eafc11964992960457e0 (diff)
downloadexchange-0774fd7020a4f70beb13ddf668686c44f8ebb84c.tar.gz
exchange-0774fd7020a4f70beb13ddf668686c44f8ebb84c.zip
fix #6213
-rw-r--r--src/include/taler_amount_lib.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index 4f77c322e..63c5dba40 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -51,6 +51,9 @@ extern "C"
51 * 51 *
52 * Note that we need sub-cent precision here as transaction fees might 52 * Note that we need sub-cent precision here as transaction fees might
53 * be that low, and as we want to support microdonations. 53 * be that low, and as we want to support microdonations.
54 *
55 * An actual `struct Amount a` thus represents
56 * "a.value + (a.fraction / #TALER_AMOUNT_FRAC_BASE)" units of "a.currency".
54 */ 57 */
55#define TALER_AMOUNT_FRAC_BASE 100000000 58#define TALER_AMOUNT_FRAC_BASE 100000000
56 59
@@ -76,7 +79,7 @@ struct TALER_AmountNBO
76 uint64_t value GNUNET_PACKED; 79 uint64_t value GNUNET_PACKED;
77 80
78 /** 81 /**
79 * Additinal fractional value, in NBO. 82 * Fraction (integer multiples of #TALER_AMOUNT_FRAC_BASE), in NBO.
80 */ 83 */
81 uint32_t fraction GNUNET_PACKED; 84 uint32_t fraction GNUNET_PACKED;
82 85
@@ -100,7 +103,7 @@ struct TALER_Amount
100 uint64_t value; 103 uint64_t value;
101 104
102 /** 105 /**
103 * Fraction (denominator of fraction) 106 * Fraction (integer multiples of #TALER_AMOUNT_FRAC_BASE).
104 */ 107 */
105 uint32_t fraction; 108 uint32_t fraction;
106 109