aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-07 13:14:25 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-07 13:14:25 +0100
commitb2e6fcae1a9b96f086c61f13f4c2c98338c4e414 (patch)
tree6c5c8c264ca674dd8c0e303daf3207bbaff65315 /src/exchangedb/plugin_exchangedb_postgres.c
parentb9ea075d61dcd47951b2f7f962025476c045aa57 (diff)
downloadexchange-b2e6fcae1a9b96f086c61f13f4c2c98338c4e414.tar.xz
fix DB API for generic blinded planchet storage
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 713e11e81..9694b73ce 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -6094,8 +6094,7 @@ postgres_insert_refresh_reveal (
GNUNET_PQ_query_param_uint32 (&i),
GNUNET_PQ_query_param_auto_from_type (&rrc->orig_coin_link_sig),
GNUNET_PQ_query_param_auto_from_type (&rrc->h_denom_pub),
- GNUNET_PQ_query_param_fixed_size (rrc->coin_ev,
- rrc->coin_ev_size),
+ TALER_PQ_query_param_blinded_planchet (&rrc->blinded_planchet),
GNUNET_PQ_query_param_auto_from_type (&rrc->coin_envelope_hash),
TALER_PQ_query_param_blinded_denom_sig (&rrc->coin_sig),
GNUNET_PQ_query_param_end
@@ -6202,15 +6201,14 @@ add_revealed_coins (void *cls,
&rrc->orig_coin_link_sig),
GNUNET_PQ_result_spec_auto_from_type ("h_coin_ev",
&rrc->coin_envelope_hash),
- GNUNET_PQ_result_spec_variable_size ("coin_ev",
- (void **) &rrc->coin_ev,
- &rrc->coin_ev_size),
+ TALER_PQ_result_spec_blinded_planchet ("coin_ev",
+ &rrc->blinded_planchet),
TALER_PQ_result_spec_blinded_denom_sig ("ev_sig",
&rrc->coin_sig),
GNUNET_PQ_result_spec_end
};
- if (NULL != rrc->coin_ev)
+ if (TALER_DENOMINATION_INVALID != rrc->blinded_planchet.cipher)
{
/* duplicate offset, not allowed */
GNUNET_break (0);
@@ -6293,10 +6291,9 @@ cleanup:
struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrc = &grctx.rrcs[i];
TALER_blinded_denom_sig_free (&rrc->coin_sig);
- GNUNET_free (rrc->coin_ev);
+ TALER_blinded_planchet_free (&rrc->blinded_planchet);
}
GNUNET_free (grctx.rrcs);
-
return qs;
}