summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-25 15:39:01 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-25 15:39:01 +0100
commitf6ecb6c895879ee4b5db3061593feaad3456d1c8 (patch)
tree81be844db2e275015592ca70994e90be013c9c87 /src/exchangedb/plugin_exchangedb_postgres.c
parent84c9adf5a6a243bd583f2144176f80708fa6a884 (diff)
downloadexchange-f6ecb6c895879ee4b5db3061593feaad3456d1c8.tar.gz
exchange-f6ecb6c895879ee4b5db3061593feaad3456d1c8.tar.bz2
exchange-f6ecb6c895879ee4b5db3061593feaad3456d1c8.zip
-eliminate redundant hash operation on link signatures
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index d5290d9c0..32b04403d 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -906,6 +906,7 @@ prepare_statements (struct PostgresClosure *pg)
"SELECT "
" rrc.freshcoin_index"
",denom.denom_pub_hash"
+ ",rrc.h_coin_ev"
",rrc.link_sig"
",rrc.coin_ev"
",rrc.ev_sig"
@@ -6113,8 +6114,7 @@ postgres_insert_refresh_reveal (
GNUNET_PQ_query_param_auto_from_type (tp),
GNUNET_PQ_query_param_fixed_size (
tprivs,
- num_tprivs
- * sizeof (struct TALER_TransferPrivateKeyP)),
+ num_tprivs * sizeof (struct TALER_TransferPrivateKeyP)),
GNUNET_PQ_query_param_end
};
@@ -6199,6 +6199,8 @@ add_revealed_coins (void *cls,
&rrc->h_denom_pub),
GNUNET_PQ_result_spec_auto_from_type ("link_sig",
&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),