summaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-coins.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-02-18 00:44:55 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2022-02-18 00:50:31 +0100
commitf4f502d037a84a38db4bc21a1db06324a05d26aa (patch)
treeabd1d813c9e1a9303d60edd3600a9e39f9d3d91a /src/auditor/taler-helper-auditor-coins.c
parenta78b3345fbf017b1cddfd09afb4b2c29287b0bba (diff)
parent22fe5da700df7328de183470c1c7f59b21c9f4f9 (diff)
downloadexchange-f4f502d037a84a38db4bc21a1db06324a05d26aa.tar.gz
exchange-f4f502d037a84a38db4bc21a1db06324a05d26aa.tar.bz2
exchange-f4f502d037a84a38db4bc21a1db06324a05d26aa.zip
-minor merge conflict resolves
Diffstat (limited to 'src/auditor/taler-helper-auditor-coins.c')
-rw-r--r--src/auditor/taler-helper-auditor-coins.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index 531f5bb46..04a35ee8d 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -1281,7 +1281,7 @@ refresh_session_cb (void *cls,
TALER_denom_pub_hash (denom_pub,
&h_denom_pub);
TALER_amount_ntoh (&fee_refresh,
- &issue->fee_refresh);
+ &issue->fees.refresh);
if (GNUNET_OK !=
TALER_wallet_melt_verify (amount_with_fee,
&fee_refresh,
@@ -1375,7 +1375,7 @@ refresh_session_cb (void *cls,
struct TALER_Amount value;
TALER_amount_ntoh (&fee,
- &reveal_ctx.new_issues[i]->fee_withdraw);
+ &reveal_ctx.new_issues[i]->fees.withdraw);
TALER_amount_ntoh (&value,
&reveal_ctx.new_issues[i]->value);
TALER_ARL_amount_add (&refresh_cost,
@@ -1391,7 +1391,7 @@ refresh_session_cb (void *cls,
struct TALER_Amount melt_fee;
TALER_amount_ntoh (&melt_fee,
- &issue->fee_refresh);
+ &issue->fees.refresh);
if (TALER_ARL_SR_POSITIVE !=
TALER_ARL_amount_subtract_neg (&amount_without_fee,
amount_with_fee,
@@ -1528,7 +1528,7 @@ refresh_session_cb (void *cls,
struct TALER_Amount rfee;
TALER_amount_ntoh (&rfee,
- &issue->fee_refresh);
+ &issue->fees.refresh);
TALER_ARL_amount_add (&total_melt_fee_income,
&total_melt_fee_income,
&rfee);
@@ -1621,7 +1621,7 @@ deposit_cb (void *cls,
&deposit->wire_salt,
&h_wire);
TALER_amount_ntoh (&deposit_fee,
- &issue->fee_deposit);
+ &issue->fees.deposit);
/* NOTE: This is one of the operations we might eventually
want to do in parallel in the background to improve
auditor performance! */
@@ -1726,7 +1726,7 @@ deposit_cb (void *cls,
struct TALER_Amount dfee;
TALER_amount_ntoh (&dfee,
- &issue->fee_deposit);
+ &issue->fees.deposit);
TALER_ARL_amount_add (&total_deposit_fee_income,
&total_deposit_fee_income,
&dfee);
@@ -1821,7 +1821,7 @@ refund_cb (void *cls,
}
TALER_amount_ntoh (&refund_fee,
- &issue->fee_refund);
+ &issue->fees.refund);
if (TALER_ARL_SR_INVALID_NEGATIVE ==
TALER_ARL_amount_subtract_neg (&amount_without_fee,
amount_with_fee,
@@ -2178,10 +2178,7 @@ check_denomination (
enum GNUNET_DB_QueryStatus qs;
struct TALER_AuditorSignatureP auditor_sig;
struct TALER_Amount coin_value;
- struct TALER_Amount fee_withdraw;
- struct TALER_Amount fee_deposit;
- struct TALER_Amount fee_refresh;
- struct TALER_Amount fee_refund;
+ struct TALER_DenomFeeSet fees;
struct GNUNET_TIME_Timestamp start;
struct GNUNET_TIME_Timestamp end;
@@ -2189,14 +2186,8 @@ check_denomination (
(void) denom_pub;
TALER_amount_ntoh (&coin_value,
&issue->value);
- TALER_amount_ntoh (&fee_withdraw,
- &issue->fee_withdraw);
- TALER_amount_ntoh (&fee_deposit,
- &issue->fee_deposit);
- TALER_amount_ntoh (&fee_refresh,
- &issue->fee_refresh);
- TALER_amount_ntoh (&fee_refund,
- &issue->fee_refund);
+ TALER_denom_fee_set_ntoh (&fees,
+ &issue->fees);
start = GNUNET_TIME_timestamp_ntoh (issue->start);
end = GNUNET_TIME_timestamp_ntoh (issue->expire_legal);
qs = TALER_ARL_edb->select_auditor_denom_sig (TALER_ARL_edb->cls,
@@ -2224,10 +2215,7 @@ check_denomination (
GNUNET_TIME_timestamp_ntoh (issue->expire_deposit),
end,
&coin_value,
- &fee_withdraw,
- &fee_deposit,
- &fee_refresh,
- &fee_refund,
+ &fees,
&TALER_ARL_auditor_pub,
&auditor_sig))
{