From da5b3ba8aeb9d47e4f99cd22847c9b539ff8ee2b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 15 Jan 2020 15:17:02 +0100 Subject: round amounts based on config, do unit test for rounding --- src/include/taler_amount_lib.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/include') 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 */ -- cgit v1.2.3