aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-29 01:15:41 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-29 01:15:41 +0200
commit85350ced32108f2ec69fbf62e0a7c3b256840fb1 (patch)
treeca8370f99feae0fb55dad2b5b13f0175e242fdcd /src/exchangedb
parent5d58316d884e660ff9a83a6e7a4bd34ae4c8e734 (diff)
rename proposal_data to contract_terms (see #4879)
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/perf_taler_exchangedb_init.c10
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c106
-rw-r--r--src/exchangedb/test_exchangedb.c48
3 files changed, 82 insertions, 82 deletions
diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c
index 967f74730..c46bea22d 100644
--- a/src/exchangedb/perf_taler_exchangedb_init.c
+++ b/src/exchangedb/perf_taler_exchangedb_init.c
@@ -209,7 +209,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi
struct TALER_EXCHANGEDB_Deposit *deposit;
struct TALER_CoinSpendSignatureP csig;
struct TALER_MerchantPublicKeyP merchant_pub;
- struct GNUNET_HashCode h_proposal_data;
+ struct GNUNET_HashCode h_contract_terms;
struct GNUNET_HashCode h_wire;
const char wire[] = "{"
"\"type\":\"SEPA\","
@@ -225,7 +225,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi
GNUNET_assert (NULL !=
(deposit = GNUNET_malloc (sizeof (struct TALER_EXCHANGEDB_Deposit) + sizeof (wire))));
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
- &h_proposal_data);
+ &h_contract_terms);
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
&h_wire);
{ //csig
@@ -233,10 +233,10 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi
{
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
struct GNUNET_HashCode h_wire;
- struct GNUNET_HashCode h_proposal_data;
+ struct GNUNET_HashCode h_contract_terms;
} unsigned_data;
- unsigned_data.h_proposal_data = h_proposal_data;
+ unsigned_data.h_contract_terms = h_contract_terms;
unsigned_data.h_wire = h_wire;
unsigned_data.purpose.size = htonl (sizeof (struct u32_presign));
unsigned_data.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
@@ -273,7 +273,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi
GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature);
}
deposit->csig = csig;
- deposit->h_proposal_data = h_proposal_data;
+ deposit->h_contract_terms = h_contract_terms;
deposit->h_wire = h_wire;
deposit->receiver_wire_account = json_loads (wire, 0, NULL);
deposit->timestamp = timestamp;
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 1a5a8dddd..a359f23be 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -529,17 +529,17 @@ postgres_create_tables (void *cls)
",refund_deadline INT8 NOT NULL"
",wire_deadline INT8 NOT NULL"
",merchant_pub BYTEA NOT NULL CHECK (LENGTH(merchant_pub)=32)"
- ",h_proposal_data BYTEA NOT NULL CHECK (LENGTH(h_proposal_data)=64)"
+ ",h_contract_terms BYTEA NOT NULL CHECK (LENGTH(h_contract_terms)=64)"
",h_wire BYTEA NOT NULL CHECK (LENGTH(h_wire)=64)"
",coin_sig BYTEA NOT NULL CHECK (LENGTH(coin_sig)=64)"
",wire TEXT NOT NULL"
",tiny BOOLEAN NOT NULL DEFAULT false"
",done BOOLEAN NOT NULL DEFAULT false"
- ",UNIQUE (coin_pub, h_proposal_data, merchant_pub)"
+ ",UNIQUE (coin_pub, h_contract_terms, merchant_pub)"
")");
- /* Index for get_deposit statement on coin_pub, h_proposal_data and merchant_pub */
+ /* Index for get_deposit statement on coin_pub, h_contract_terms and merchant_pub */
SQLEXEC_INDEX("CREATE INDEX deposits_coin_pub_index "
- "ON deposits(coin_pub, h_proposal_data, merchant_pub)");
+ "ON deposits(coin_pub, h_contract_terms, merchant_pub)");
/* Table with information about coins that have been refunded. (Technically
one of the deposit operations that a coin was involved with is refunded.)*/
@@ -548,12 +548,12 @@ postgres_create_tables (void *cls)
",coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE CASCADE"
",merchant_pub BYTEA NOT NULL CHECK(LENGTH(merchant_pub)=32)"
",merchant_sig BYTEA NOT NULL CHECK(LENGTH(merchant_sig)=64)"
- ",h_proposal_data BYTEA NOT NULL CHECK(LENGTH(h_proposal_data)=64)"
+ ",h_contract_terms BYTEA NOT NULL CHECK(LENGTH(h_contract_terms)=64)"
",rtransaction_id INT8 NOT NULL"
",amount_with_fee_val INT8 NOT NULL"
",amount_with_fee_frac INT4 NOT NULL"
",amount_with_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL"
- ",PRIMARY KEY (coin_pub, merchant_pub, h_proposal_data, rtransaction_id)" /* this combo must be unique, and we usually select by coin_pub */
+ ",PRIMARY KEY (coin_pub, merchant_pub, h_contract_terms, rtransaction_id)" /* this combo must be unique, and we usually select by coin_pub */
") ");
/* This table contains the data for
@@ -1055,7 +1055,7 @@ postgres_prepare (PGconn *db_conn)
"SELECT"
" merchant_pub"
",merchant_sig"
- ",h_proposal_data"
+ ",h_contract_terms"
",rtransaction_id"
",denom.denom_pub"
",coin_pub"
@@ -1075,7 +1075,7 @@ postgres_prepare (PGconn *db_conn)
"SELECT"
" merchant_pub"
",merchant_sig"
- ",h_proposal_data"
+ ",h_contract_terms"
",rtransaction_id"
",amount_with_fee_val"
",amount_with_fee_frac"
@@ -1141,7 +1141,7 @@ postgres_prepare (PGconn *db_conn)
",refund_deadline"
",wire_deadline"
",merchant_pub"
- ",h_proposal_data"
+ ",h_contract_terms"
",h_wire"
",coin_sig"
",wire"
@@ -1156,7 +1156,7 @@ postgres_prepare (PGconn *db_conn)
"(coin_pub "
",merchant_pub "
",merchant_sig "
- ",h_proposal_data "
+ ",h_contract_terms "
",rtransaction_id "
",amount_with_fee_val "
",amount_with_fee_frac "
@@ -1175,12 +1175,12 @@ postgres_prepare (PGconn *db_conn)
",timestamp"
",refund_deadline"
",wire_deadline"
- ",h_proposal_data"
+ ",h_contract_terms"
",h_wire"
" FROM deposits"
" WHERE ("
" (coin_pub=$1) AND"
- " (h_proposal_data=$2) AND"
+ " (h_contract_terms=$2) AND"
" (merchant_pub=$3)"
" )",
3, NULL);
@@ -1198,7 +1198,7 @@ postgres_prepare (PGconn *db_conn)
",coin_sig"
",refund_deadline"
",wire_deadline"
- ",h_proposal_data"
+ ",h_contract_terms"
",wire"
",done"
",deposit_serial_id"
@@ -1228,7 +1228,7 @@ postgres_prepare (PGconn *db_conn)
" WHERE ("
" (coin_pub=$1) AND"
" (merchant_pub=$2) AND"
- " (h_proposal_data=$3) AND"
+ " (h_contract_terms=$3) AND"
" (h_wire=$4)"
" )",
4, NULL);
@@ -1244,7 +1244,7 @@ postgres_prepare (PGconn *db_conn)
",denom.fee_deposit_frac"
",denom.fee_deposit_curr"
",wire_deadline"
- ",h_proposal_data"
+ ",h_contract_terms"
",wire"
",merchant_pub"
",coin_pub"
@@ -1271,7 +1271,7 @@ postgres_prepare (PGconn *db_conn)
",denom.fee_deposit_frac"
",denom.fee_deposit_curr"
",wire_deadline"
- ",h_proposal_data"
+ ",h_contract_terms"
",coin_pub"
" FROM deposits"
" JOIN known_coins USING (coin_pub)"
@@ -1304,7 +1304,7 @@ postgres_prepare (PGconn *db_conn)
" FROM deposits"
" WHERE coin_pub=$1"
" AND merchant_pub=$2"
- " AND h_proposal_data=$3"
+ " AND h_contract_terms=$3"
" AND h_wire=$4",
5, NULL);
@@ -1321,7 +1321,7 @@ postgres_prepare (PGconn *db_conn)
",timestamp"
",refund_deadline"
",merchant_pub"
- ",h_proposal_data"
+ ",h_contract_terms"
",h_wire"
",wire"
",coin_sig"
@@ -1395,7 +1395,7 @@ postgres_prepare (PGconn *db_conn)
PREPARE ("lookup_transactions",
"SELECT"
" aggregation_serial_id"
- ",deposits.h_proposal_data"
+ ",deposits.h_contract_terms"
",deposits.wire"
",deposits.h_wire"
",deposits.coin_pub"
@@ -1432,7 +1432,7 @@ postgres_prepare (PGconn *db_conn)
" JOIN denominations denom USING (denom_pub_hash)"
" JOIN wire_out USING (wtid_raw)"
" WHERE coin_pub=$1"
- " AND h_proposal_data=$2"
+ " AND h_contract_terms=$2"
" AND h_wire=$3"
" AND merchant_pub=$4",
4, NULL);
@@ -3060,7 +3060,7 @@ postgres_have_deposit (void *cls,
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub),
- GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),
+ GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract_terms),
GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub),
GNUNET_PQ_query_param_end
};
@@ -3095,8 +3095,8 @@ postgres_have_deposit (void *cls,
&deposit2.refund_deadline),
GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
&deposit2.wire_deadline),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &deposit2.h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &deposit2.h_contract_terms),
GNUNET_PQ_result_spec_auto_from_type ("h_wire",
&deposit2.h_wire),
GNUNET_PQ_result_spec_end
@@ -3116,8 +3116,8 @@ postgres_have_deposit (void *cls,
deposit2.timestamp.abs_value_us) ||
(deposit->refund_deadline.abs_value_us !=
deposit2.refund_deadline.abs_value_us) ||
- (0 != memcmp (&deposit->h_proposal_data,
- &deposit2.h_proposal_data,
+ (0 != memcmp (&deposit->h_contract_terms,
+ &deposit2.h_contract_terms,
sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp (&deposit->h_wire,
&deposit2.h_wire,
@@ -3182,7 +3182,7 @@ postgres_test_deposit_done (void *cls,
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub),
GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub),
- GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),
+ GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract_terms),
GNUNET_PQ_query_param_auto_from_type (&deposit->h_wire),
GNUNET_PQ_query_param_end
};
@@ -3308,7 +3308,7 @@ postgres_get_ready_deposit (void *cls,
struct TALER_Amount amount_with_fee;
struct TALER_Amount deposit_fee;
struct GNUNET_TIME_Absolute wire_deadline;
- struct GNUNET_HashCode h_proposal_data;
+ struct GNUNET_HashCode h_contract_terms;
struct TALER_MerchantPublicKeyP merchant_pub;
struct TALER_CoinSpendPublicKeyP coin_pub;
uint64_t serial_id;
@@ -3322,8 +3322,8 @@ postgres_get_ready_deposit (void *cls,
&deposit_fee),
GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
&wire_deadline),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &h_contract_terms),
GNUNET_PQ_result_spec_auto_from_type ("merchant_pub",
&merchant_pub),
GNUNET_PQ_result_spec_auto_from_type ("coin_pub",
@@ -3348,7 +3348,7 @@ postgres_get_ready_deposit (void *cls,
&coin_pub,
&amount_with_fee,
&deposit_fee,
- &h_proposal_data,
+ &h_contract_terms,
wire_deadline,
wire);
GNUNET_PQ_cleanup_result (rs);
@@ -3412,7 +3412,7 @@ postgres_iterate_matching_deposits (void *cls,
struct TALER_Amount amount_with_fee;
struct TALER_Amount deposit_fee;
struct GNUNET_TIME_Absolute wire_deadline;
- struct GNUNET_HashCode h_proposal_data;
+ struct GNUNET_HashCode h_contract_terms;
struct TALER_CoinSpendPublicKeyP coin_pub;
uint64_t serial_id;
int ret;
@@ -3425,8 +3425,8 @@ postgres_iterate_matching_deposits (void *cls,
&deposit_fee),
GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
&wire_deadline),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &h_contract_terms),
GNUNET_PQ_result_spec_auto_from_type ("coin_pub",
&coin_pub),
GNUNET_PQ_result_spec_end
@@ -3446,7 +3446,7 @@ postgres_iterate_matching_deposits (void *cls,
&coin_pub,
&amount_with_fee,
&deposit_fee,
- &h_proposal_data,
+ &h_contract_terms,
wire_deadline,
NULL);
GNUNET_PQ_cleanup_result (rs);
@@ -3584,7 +3584,7 @@ postgres_insert_deposit (void *cls,
GNUNET_PQ_query_param_absolute_time (&deposit->refund_deadline),
GNUNET_PQ_query_param_absolute_time (&deposit->wire_deadline),
GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub),
- GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),
+ GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract_terms),
GNUNET_PQ_query_param_auto_from_type (&deposit->h_wire),
GNUNET_PQ_query_param_auto_from_type (&deposit->csig),
TALER_PQ_query_param_json (deposit->receiver_wire_account),
@@ -3638,7 +3638,7 @@ postgres_insert_refund (void *cls,
GNUNET_PQ_query_param_auto_from_type (&refund->coin.coin_pub),
GNUNET_PQ_query_param_auto_from_type (&refund->merchant_pub),
GNUNET_PQ_query_param_auto_from_type (&refund->merchant_sig),
- GNUNET_PQ_query_param_auto_from_type (&refund->h_proposal_data),
+ GNUNET_PQ_query_param_auto_from_type (&refund->h_contract_terms),
GNUNET_PQ_query_param_uint64 (&refund->rtransaction_id),
TALER_PQ_query_param_amount (&refund->refund_amount),
GNUNET_PQ_query_param_end
@@ -4474,8 +4474,8 @@ postgres_get_coin_transactions (void *cls,
&deposit->refund_deadline),
GNUNET_PQ_result_spec_auto_from_type ("merchant_pub",
&deposit->merchant_pub),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &deposit->h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &deposit->h_contract_terms),
GNUNET_PQ_result_spec_auto_from_type ("h_wire",
&deposit->h_wire),
TALER_PQ_result_spec_json ("wire",
@@ -4618,8 +4618,8 @@ postgres_get_coin_transactions (void *cls,
&refund->merchant_pub),
GNUNET_PQ_result_spec_auto_from_type ("merchant_sig",
&refund->merchant_sig),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &refund->h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &refund->h_contract_terms),
GNUNET_PQ_result_spec_uint64 ("rtransaction_id",
&refund->rtransaction_id),
TALER_PQ_result_spec_amount ("amount_with_fee",
@@ -4782,7 +4782,7 @@ postgres_lookup_wire_transfer (void *cls,
for (int i=0;i<nrows;i++)
{
uint64_t rowid;
- struct GNUNET_HashCode h_proposal_data;
+ struct GNUNET_HashCode h_contract_terms;
struct GNUNET_HashCode h_wire;
struct TALER_CoinSpendPublicKeyP coin_pub;
struct TALER_MerchantPublicKeyP merchant_pub;
@@ -4794,7 +4794,7 @@ postgres_lookup_wire_transfer (void *cls,
const char *wire_method;
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_uint64 ("aggregation_serial_id", &rowid),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", &h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms", &h_contract_terms),
TALER_PQ_result_spec_json ("wire", &wire),
GNUNET_PQ_result_spec_auto_from_type ("h_wire", &h_wire),
GNUNET_PQ_result_spec_auto_from_type ("coin_pub", &coin_pub),
@@ -4834,7 +4834,7 @@ postgres_lookup_wire_transfer (void *cls,
wire_method,
&h_wire,
exec_time,
- &h_proposal_data,
+ &h_contract_terms,
&coin_pub,
&amount_with_fee,
&deposit_fee);
@@ -4852,7 +4852,7 @@ postgres_lookup_wire_transfer (void *cls,
*
* @param cls closure
* @param session database connection
- * @param h_proposal_data hash of the proposal data
+ * @param h_contract_terms hash of the proposal data
* @param h_wire hash of merchant wire details
* @param coin_pub public key of deposited coin
* @param merchant_pub merchant public key
@@ -4864,7 +4864,7 @@ postgres_lookup_wire_transfer (void *cls,
static int
postgres_wire_lookup_deposit_wtid (void *cls,
struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_contract_terms,
const struct GNUNET_HashCode *h_wire,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -4874,7 +4874,7 @@ postgres_wire_lookup_deposit_wtid (void *cls,
PGresult *result;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (coin_pub),
- GNUNET_PQ_query_param_auto_from_type (h_proposal_data),
+ GNUNET_PQ_query_param_auto_from_type (h_contract_terms),
GNUNET_PQ_query_param_auto_from_type (h_wire),
GNUNET_PQ_query_param_auto_from_type (merchant_pub),
GNUNET_PQ_query_param_end
@@ -4905,7 +4905,7 @@ postgres_wire_lookup_deposit_wtid (void *cls,
struct GNUNET_PQ_QueryParam params2[] = {
GNUNET_PQ_query_param_auto_from_type (coin_pub),
GNUNET_PQ_query_param_auto_from_type (merchant_pub),
- GNUNET_PQ_query_param_auto_from_type (h_proposal_data),
+ GNUNET_PQ_query_param_auto_from_type (h_contract_terms),
GNUNET_PQ_query_param_auto_from_type (h_wire),
GNUNET_PQ_query_param_end
};
@@ -5699,8 +5699,8 @@ postgres_select_deposits_above_serial_id (void *cls,
&deposit.refund_deadline),
GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
&deposit.wire_deadline),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &deposit.h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &deposit.h_contract_terms),
TALER_PQ_result_spec_json ("wire",
&deposit.receiver_wire_account),
GNUNET_PQ_result_spec_auto_from_type ("done",
@@ -5726,7 +5726,7 @@ postgres_select_deposits_above_serial_id (void *cls,
&deposit.coin.coin_pub,
&deposit.csig,
&deposit.amount_with_fee,
- &deposit.h_proposal_data,
+ &deposit.h_contract_terms,
deposit.refund_deadline,
deposit.wire_deadline,
deposit.receiver_wire_account,
@@ -5903,8 +5903,8 @@ postgres_select_refunds_above_serial_id (void *cls,
&refund.merchant_pub),
GNUNET_PQ_result_spec_auto_from_type ("merchant_sig",
&refund.merchant_sig),
- GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
- &refund.h_proposal_data),
+ GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms",
+ &refund.h_contract_terms),
GNUNET_PQ_result_spec_uint64 ("rtransaction_id",
&refund.rtransaction_id),
GNUNET_PQ_result_spec_rsa_public_key ("denom_pub",
@@ -5932,7 +5932,7 @@ postgres_select_refunds_above_serial_id (void *cls,
&refund.coin.coin_pub,
&refund.merchant_pub,
&refund.merchant_sig,
- &refund.h_proposal_data,
+ &refund.h_contract_terms,
refund.rtransaction_id,
&refund.refund_amount);
GNUNET_PQ_cleanup_result (rs);
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index 8924c0db1..232b58c6c 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -789,7 +789,7 @@ cb_wt_never (void *cls,
const char *wire_method,
const struct GNUNET_HashCode *h_wire,
struct GNUNET_TIME_Absolute exec_time,
- const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_contract_terms,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *coin_value,
const struct TALER_Amount *coin_fee)
@@ -814,7 +814,7 @@ cb_wtid_never (void *cls,
static struct TALER_MerchantPublicKeyP merchant_pub_wt;
static struct GNUNET_HashCode h_wire_wt;
-static struct GNUNET_HashCode h_proposal_data_wt;
+static struct GNUNET_HashCode h_contract_terms_wt;
static struct TALER_CoinSpendPublicKeyP coin_pub_wt;
static struct TALER_Amount coin_value_wt;
static struct TALER_Amount coin_fee_wt;
@@ -833,7 +833,7 @@ cb_wt_check (void *cls,
const char *wire_method,
const struct GNUNET_HashCode *h_wire,
struct GNUNET_TIME_Absolute exec_time,
- const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_contract_terms,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *coin_value,
const struct TALER_Amount *coin_fee)
@@ -848,8 +848,8 @@ cb_wt_check (void *cls,
&h_wire_wt,
sizeof (struct GNUNET_HashCode)));
GNUNET_assert (exec_time.abs_value_us == wire_out_date.abs_value_us);
- GNUNET_assert (0 == memcmp (h_proposal_data,
- &h_proposal_data_wt,
+ GNUNET_assert (0 == memcmp (h_contract_terms,
+ &h_contract_terms_wt,
sizeof (struct GNUNET_HashCode)));
GNUNET_assert (0 == memcmp (coin_pub,
&coin_pub_wt,
@@ -902,7 +902,7 @@ static uint64_t deposit_rowid;
* @param coin_pub public key of the coin
* @param amount_with_fee amount that was deposited including fee
* @param deposit_fee amount the exchange gets to keep as transaction fees
- * @param h_proposal_data hash of the proposal data known to merchant and customer
+ * @param h_contract_terms hash of the proposal data known to merchant and customer
* @param wire_deadline by which the merchant adviced that he would like the
* wire transfer to be executed
* @param wire wire details for the merchant, NULL from iterate_matching_deposits()
@@ -916,7 +916,7 @@ deposit_cb (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
- const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_contract_terms,
struct GNUNET_TIME_Absolute wire_deadline,
const json_t *wire)
{
@@ -933,8 +933,8 @@ deposit_cb (void *cls,
&deposit->amount_with_fee)) ||
(0 != TALER_amount_cmp (deposit_fee,
&deposit->deposit_fee)) ||
- (0 != memcmp (h_proposal_data,
- &deposit->h_proposal_data,
+ (0 != memcmp (h_contract_terms,
+ &deposit->h_contract_terms,
sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp (coin_pub,
&deposit->coin.coin_pub,
@@ -963,7 +963,7 @@ deposit_cb (void *cls,
* @param coin_pub public key of the coin
* @param coin_sig signature from the coin
* @param amount_with_fee amount that was deposited including fee
- * @param h_proposal_data hash of the proposal data known to merchant and customer
+ * @param h_contract_terms hash of the proposal data known to merchant and customer
* @param refund_deadline by which the merchant adviced that he might want
* to get a refund
* @param wire_deadline by which the merchant adviced that he would like the
@@ -981,7 +981,7 @@ audit_deposit_cb (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_CoinSpendSignatureP *coin_sig,
const struct TALER_Amount *amount_with_fee,
- const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_contract_terms,
struct GNUNET_TIME_Absolute refund_deadline,
struct GNUNET_TIME_Absolute wire_deadline,
const json_t *receiver_wire_account,
@@ -1002,7 +1002,7 @@ audit_deposit_cb (void *cls,
* @param coin_pub public key of the coin
* @param merchant_pub public key of the merchant
* @param merchant_sig signature of the merchant
- * @param h_proposal_data hash of the proposal data in
+ * @param h_contract_terms hash of the proposal data in
* the contract between merchant and customer
* @param rtransaction_id refund transaction ID chosen by the merchant
* @param amount_with_fee amount that was deposited including fee
@@ -1015,7 +1015,7 @@ audit_refund_cb (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_MerchantPublicKeyP *merchant_pub,
const struct TALER_MerchantSignatureP *merchant_sig,
- const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_contract_terms,
uint64_t rtransaction_id,
const struct TALER_Amount *amount_with_fee)
{
@@ -1290,7 +1290,7 @@ test_wire_out (struct TALER_EXCHANGEDB_Session *session,
/* setup values for wire transfer aggregation data */
merchant_pub_wt = deposit->merchant_pub;
h_wire_wt = deposit->h_wire;
- h_proposal_data_wt = deposit->h_proposal_data;
+ h_contract_terms_wt = deposit->h_contract_terms;
coin_pub_wt = deposit->coin.coin_pub;
coin_value_wt = deposit->amount_with_fee;
@@ -1307,13 +1307,13 @@ test_wire_out (struct TALER_EXCHANGEDB_Session *session,
NULL));
{
- struct GNUNET_HashCode h_proposal_data_wt2 = h_proposal_data_wt;
+ struct GNUNET_HashCode h_contract_terms_wt2 = h_contract_terms_wt;
- h_proposal_data_wt2.bits[0]++;
+ h_contract_terms_wt2.bits[0]++;
FAILIF (GNUNET_NO !=
plugin->wire_lookup_deposit_wtid (plugin->cls,
session,
- &h_proposal_data_wt2,
+ &h_contract_terms_wt2,
&h_wire_wt,
&coin_pub_wt,
&merchant_pub_wt,
@@ -1350,7 +1350,7 @@ test_wire_out (struct TALER_EXCHANGEDB_Session *session,
FAILIF (GNUNET_OK !=
plugin->wire_lookup_deposit_wtid (plugin->cls,
session,
- &h_proposal_data_wt,
+ &h_contract_terms_wt,
&h_wire_wt,
&coin_pub_wt,
&merchant_pub_wt,
@@ -1760,7 +1760,7 @@ run (void *cls)
deposit.coin.denom_sig = cbc.sig;
RND_BLK (&deposit.csig);
RND_BLK (&deposit.merchant_pub);
- RND_BLK (&deposit.h_proposal_data);
+ RND_BLK (&deposit.h_contract_terms);
wire = json_loads (json_wire_str, 0, NULL);
TALER_JSON_hash (wire,
&deposit.h_wire);
@@ -1856,7 +1856,7 @@ run (void *cls)
refund.coin = deposit.coin;
refund.merchant_pub = deposit.merchant_pub;
RND_BLK (&refund.merchant_sig);
- refund.h_proposal_data = deposit.h_proposal_data;
+ refund.h_contract_terms = deposit.h_contract_terms;
refund.rtransaction_id = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);
refund.refund_amount = deposit.amount_with_fee;
refund.refund_fee = fee_refund;
@@ -1952,8 +1952,8 @@ run (void *cls)
FAILIF (0 != memcmp (&have->merchant_pub,
&deposit.merchant_pub,
sizeof (struct TALER_MerchantPublicKeyP)));
- FAILIF (0 != memcmp (&have->h_proposal_data,
- &deposit.h_proposal_data,
+ FAILIF (0 != memcmp (&have->h_contract_terms,
+ &deposit.h_contract_terms,
sizeof (struct GNUNET_HashCode)));
FAILIF (0 != memcmp (&have->h_wire,
&deposit.h_wire,
@@ -1994,8 +1994,8 @@ run (void *cls)
FAILIF (0 != memcmp (&have->merchant_sig,
&refund.merchant_sig,
sizeof (struct TALER_MerchantSignatureP)));
- FAILIF (0 != memcmp (&have->h_proposal_data,
- &refund.h_proposal_data,
+ FAILIF (0 != memcmp (&have->h_contract_terms,
+ &refund.h_contract_terms,
sizeof (struct GNUNET_HashCode)));
FAILIF (have->rtransaction_id != refund.rtransaction_id);
FAILIF (0 != TALER_amount_cmp (&have->refund_amount,