diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-03-05 15:13:07 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-03-05 15:13:07 +0100 |
commit | 5fa977cc05daca469044711ffb6a497287094c70 (patch) | |
tree | 2d6aa23e13f0ec088bdcc20074285bf2493a0a0d /src/util/util.c | |
parent | 841e56bafd64e8c1aea29dc542a2d9d0cd1bc74e (diff) |
work on global fee structure
Diffstat (limited to 'src/util/util.c')
-rw-r--r-- | src/util/util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util/util.c b/src/util/util.c index 33b0a77cc..2d10fd69d 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -84,6 +84,10 @@ TALER_global_fee_set_hton (struct TALER_GlobalFeeSetNBOP *nbo, &fees->history); TALER_amount_hton (&nbo->kyc, &fees->kyc); + TALER_amount_hton (&nbo->account, + &fees->account); + TALER_amount_hton (&nbo->purse, + &fees->purse); } @@ -95,6 +99,10 @@ TALER_global_fee_set_ntoh (struct TALER_GlobalFeeSet *fees, &nbo->history); TALER_amount_ntoh (&fees->kyc, &nbo->kyc); + TALER_amount_ntoh (&fees->account, + &nbo->account); + TALER_amount_ntoh (&fees->purse, + &nbo->purse); } @@ -138,6 +146,14 @@ TALER_global_fee_set_cmp (const struct TALER_GlobalFeeSet *f1, &f2->kyc); if (0 != ret) return ret; + ret = TALER_amount_cmp (&f1->account, + &f2->account); + if (0 != ret) + return ret; + ret = TALER_amount_cmp (&f1->purse, + &f2->purse); + if (0 != ret) + return ret; return 0; } |