aboutsummaryrefslogtreecommitdiff
path: root/src/util/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/util.c')
-rw-r--r--src/util/util.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/util/util.c b/src/util/util.c
index 6dfd65574..33b0a77cc 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -124,6 +124,46 @@ TALER_wire_fee_set_ntoh (struct TALER_WireFeeSet *fees,
}
+int
+TALER_global_fee_set_cmp (const struct TALER_GlobalFeeSet *f1,
+ const struct TALER_GlobalFeeSet *f2)
+{
+ int ret;
+
+ ret = TALER_amount_cmp (&f1->history,
+ &f2->history);
+ if (0 != ret)
+ return ret;
+ ret = TALER_amount_cmp (&f1->kyc,
+ &f2->kyc);
+ if (0 != ret)
+ return ret;
+ return 0;
+}
+
+
+int
+TALER_wire_fee_set_cmp (const struct TALER_WireFeeSet *f1,
+ const struct TALER_WireFeeSet *f2)
+{
+ int ret;
+
+ ret = TALER_amount_cmp (&f1->wire,
+ &f2->wire);
+ if (0 != ret)
+ return ret;
+ ret = TALER_amount_cmp (&f1->closing,
+ &f2->closing);
+ if (0 != ret)
+ return ret;
+ ret = TALER_amount_cmp (&f1->wad,
+ &f2->wad);
+ if (0 != ret)
+ return ret;
+ return 0;
+}
+
+
enum GNUNET_GenericReturnValue
TALER_denom_fee_check_currency (
const char *currency,