diff options
Diffstat (limited to 'src/util/amount.c')
-rw-r--r-- | src/util/amount.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/amount.c b/src/util/amount.c index 7765c74bb..20d064243 100644 --- a/src/util/amount.c +++ b/src/util/amount.c @@ -207,6 +207,8 @@ void TALER_amount_hton (struct TALER_AmountNBO *res, const struct TALER_Amount *d) { + GNUNET_assert (GNUNET_YES == + TALER_amount_is_valid (d)); res->value = GNUNET_htonll (d->value); res->fraction = htonl (d->fraction); memcpy (res->currency, @@ -230,6 +232,8 @@ TALER_amount_ntoh (struct TALER_Amount *res, memcpy (res->currency, dn->currency, TALER_CURRENCY_LEN); + GNUNET_assert (GNUNET_YES == + TALER_amount_is_valid (res)); } |