diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-17 18:59:15 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-17 18:59:15 +0100 |
commit | 7378b5a081a0d839c3bd63f6ddd359bca50be695 (patch) | |
tree | ce62b33d65e6372ea59ae7409b193824735ac538 /src/include/taler_amount_lib.h | |
parent | ac2e40d0491c0f118ff26cb316ec47e0786818e7 (diff) | |
download | exchange-7378b5a081a0d839c3bd63f6ddd359bca50be695.tar.xz |
amount rounding a la Christian
Diffstat (limited to 'src/include/taler_amount_lib.h')
-rw-r--r-- | src/include/taler_amount_lib.h | 7 |
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 */ |