summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-01-17 18:59:15 +0100
committerFlorian Dold <florian.dold@gmail.com>2020-01-17 18:59:15 +0100
commit7378b5a081a0d839c3bd63f6ddd359bca50be695 (patch)
treece62b33d65e6372ea59ae7409b193824735ac538 /src/include
parentac2e40d0491c0f118ff26cb316ec47e0786818e7 (diff)
downloadexchange-7378b5a081a0d839c3bd63f6ddd359bca50be695.tar.gz
exchange-7378b5a081a0d839c3bd63f6ddd359bca50be695.tar.bz2
exchange-7378b5a081a0d839c3bd63f6ddd359bca50be695.zip
amount rounding a la Christian
Diffstat (limited to 'src/include')
-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 7118e2ecf..df1cf06f9 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -311,15 +311,18 @@ TALER_amount2s (const struct TALER_Amount *amount);
/**
* Round the amount to something that can be transferred on the wire.
+ * The rounding mode is specified via the smallest transferable unit,
+ * which must only have a fractional part.
*
* @param[in,out] amount amount to round down
- * @param max_fractional_digits number of fractional digits to round down to
+ * @param[in] round_unit unit that should be rounded down to,
+ * the value part of this amount must be zero
* @return #GNUNET_OK on success, #GNUNET_NO if rounding was unnecessary,
* #GNUNET_SYSERR if the amount or currency was invalid
*/
int
TALER_amount_round_down (struct TALER_Amount *amount,
- uint8_t max_fractional_digits);
+ const struct TALER_Amount *round_unit);
#if 0 /* keep Emacsens' auto-indent happy */