diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-15 15:17:02 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-15 15:17:25 +0100 |
commit | da5b3ba8aeb9d47e4f99cd22847c9b539ff8ee2b (patch) | |
tree | 6e67e1d08fd941144f464dfe55b8835db65687e6 /src/include | |
parent | b37fff0d5b08926169633ce8822de7ac616ae169 (diff) |
round amounts based on config, do unit test for rounding
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_amount_lib.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h index 37f42bd99..7118e2ecf 100644 --- a/src/include/taler_amount_lib.h +++ b/src/include/taler_amount_lib.h @@ -310,15 +310,16 @@ TALER_amount2s (const struct TALER_Amount *amount); /** - * Round the amount to something that can be - * transferred on the wire. + * Round the amount to something that can be transferred on the wire. * * @param[in,out] amount amount to round down + * @param max_fractional_digits number of fractional digits to round down to * @return #GNUNET_OK on success, #GNUNET_NO if rounding was unnecessary, * #GNUNET_SYSERR if the amount or currency was invalid */ int -TALER_amount_round (struct TALER_Amount *amount); +TALER_amount_round_down (struct TALER_Amount *amount, + uint8_t max_fractional_digits); #if 0 /* keep Emacsens' auto-indent happy */ |