diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-02-07 15:09:10 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-02-07 15:09:10 +0100 |
commit | 92246c3e8841978cb8f495c3e2da3deca19d7391 (patch) | |
tree | cda2fb5623f6b544c3f6eb2005c48c0228b551f6 /src/exchangedb | |
parent | 8c820b6916841d746475a4f67904272a518a7aa9 (diff) |
remove transaction_id, only one payment per proposal allowed
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/perf_taler_exchangedb_init.c | 2 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 72 | ||||
-rw-r--r-- | src/exchangedb/test_exchangedb.c | 22 |
3 files changed, 15 insertions, 81 deletions
diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index 41dda56e6..967f74730 100644 --- a/src/exchangedb/perf_taler_exchangedb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -217,7 +217,6 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi "\"NAME\":\"GNUNET E.\"," "\"BIC\":\"GENODEF1SRL\"" "}"; - static uint64_t transaction_id = 0; struct GNUNET_TIME_Absolute timestamp; struct GNUNET_TIME_Absolute refund_deadline; struct TALER_Amount amount_with_fee; @@ -277,7 +276,6 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi deposit->h_proposal_data = h_proposal_data; deposit->h_wire = h_wire; deposit->receiver_wire_account = json_loads (wire, 0, NULL); - deposit->transaction_id = transaction_id++; deposit->timestamp = timestamp; deposit->refund_deadline = refund_deadline; deposit->amount_with_fee = amount_with_fee; diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 69a1cae34..0d731dfac 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -427,7 +427,6 @@ postgres_create_tables (void *cls) SQLEXEC("CREATE TABLE IF NOT EXISTS deposits " "(deposit_serial_id BIGSERIAL PRIMARY KEY" ",coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE CASCADE" - ",transaction_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" @@ -441,11 +440,11 @@ postgres_create_tables (void *cls) ",wire TEXT NOT NULL" ",tiny BOOLEAN NOT NULL DEFAULT false" ",done BOOLEAN NOT NULL DEFAULT false" - ",UNIQUE (coin_pub, transaction_id, merchant_pub)" + ",UNIQUE (coin_pub, h_proposal_data, merchant_pub)" ")"); - /* Index for get_deposit statement on coin_pub, transaction_id and merchant_pub */ + /* Index for get_deposit statement on coin_pub, h_proposal_data and merchant_pub */ SQLEXEC_INDEX("CREATE INDEX deposits_coin_pub_index " - "ON deposits(coin_pub, transaction_id, merchant_pub)"); + "ON deposits(coin_pub, h_proposal_data, 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.)*/ @@ -455,12 +454,11 @@ postgres_create_tables (void *cls) ",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)" - ",transaction_id INT8 NOT NULL" ",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, transaction_id, rtransaction_id)" /* this combo must be unique, and we usually select by coin_pub */ + ",PRIMARY KEY (coin_pub, merchant_pub, h_proposal_data, rtransaction_id)" /* this combo must be unique, and we usually select by coin_pub */ ") "); /* Table for the tracking API, mapping from wire transfer identifiers @@ -863,7 +861,6 @@ postgres_prepare (PGconn *db_conn) " merchant_pub" ",merchant_sig" ",h_proposal_data" - ",transaction_id" ",rtransaction_id" ",coin_pub" ",amount_with_fee_val" @@ -881,7 +878,6 @@ postgres_prepare (PGconn *db_conn) " merchant_pub" ",merchant_sig" ",h_proposal_data" - ",transaction_id" ",rtransaction_id" ",amount_with_fee_val" ",amount_with_fee_frac" @@ -942,7 +938,6 @@ postgres_prepare (PGconn *db_conn) PREPARE ("insert_deposit", "INSERT INTO deposits " "(coin_pub" - ",transaction_id" ",amount_with_fee_val" ",amount_with_fee_frac" ",amount_with_fee_curr" @@ -966,7 +961,6 @@ postgres_prepare (PGconn *db_conn) ",merchant_pub " ",merchant_sig " ",h_proposal_data " - ",transaction_id " ",rtransaction_id " ",amount_with_fee_val " ",amount_with_fee_frac " @@ -990,7 +984,7 @@ postgres_prepare (PGconn *db_conn) " FROM deposits" " WHERE (" " (coin_pub=$1) AND" - " (transaction_id=$2) AND" + " (h_proposal_data=$2) AND" " (merchant_pub=$3)" " )", 3, NULL); @@ -1005,7 +999,6 @@ postgres_prepare (PGconn *db_conn) ",merchant_pub" ",coin_pub" ",coin_sig" - ",transaction_id" ",refund_deadline" ",wire_deadline" ",h_proposal_data" @@ -1035,12 +1028,11 @@ postgres_prepare (PGconn *db_conn) " JOIN denominations denom USING (denom_pub)" " WHERE (" " (coin_pub=$1) AND" - " (transaction_id=$2) AND" - " (merchant_pub=$3) AND" - " (h_proposal_data=$4) AND" - " (h_wire=$5)" + " (merchant_pub=$2) AND" + " (h_proposal_data=$3) AND" + " (h_wire=$4)" " )", - 5, NULL); + 4, NULL); /* Used in #postgres_get_ready_deposit() */ PREPARE ("deposits_get_ready", @@ -1053,7 +1045,6 @@ postgres_prepare (PGconn *db_conn) ",denom.fee_deposit_frac" ",denom.fee_deposit_curr" ",wire_deadline" - ",transaction_id" ",h_proposal_data" ",wire" ",merchant_pub" @@ -1081,7 +1072,6 @@ postgres_prepare (PGconn *db_conn) ",denom.fee_deposit_frac" ",denom.fee_deposit_curr" ",wire_deadline" - ",transaction_id" ",h_proposal_data" ",coin_pub" " FROM deposits" @@ -1114,17 +1104,15 @@ postgres_prepare (PGconn *db_conn) "SELECT done" " FROM deposits" " WHERE coin_pub=$1" - " AND transaction_id=$2" - " AND merchant_pub=$3" - " AND h_proposal_data=$4" - " AND h_wire=$5", + " AND merchant_pub=$2" + " AND h_proposal_data=$3" + " AND h_wire=$4", 5, NULL); /* Used in #postgres_get_coin_transactions() to obtain information about how a coin has been spend with /deposit requests. */ PREPARE ("get_deposit_with_coin_pub", "SELECT" - " transaction_id" ",amount_with_fee_val" ",amount_with_fee_frac" ",amount_with_fee_curr" @@ -1208,7 +1196,6 @@ postgres_prepare (PGconn *db_conn) ",deposits.h_wire" ",deposits.coin_pub" ",deposits.merchant_pub" - ",deposits.transaction_id" ",execution_time" ",deposits.amount_with_fee_val" ",deposits.amount_with_fee_frac" @@ -1241,9 +1228,8 @@ postgres_prepare (PGconn *db_conn) " WHERE coin_pub=$1" " AND h_proposal_data=$2" " AND h_wire=$3" - " AND transaction_id=$4" - " AND merchant_pub=$5", - 5, NULL); + " AND merchant_pub=$4", + 4, NULL); /* Used in #postgres_insert_aggregation_tracking */ PREPARE ("insert_aggregation_tracking", @@ -2229,7 +2215,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_uint64 (&deposit->transaction_id), + GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data), GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub), GNUNET_PQ_query_param_end }; @@ -2358,7 +2344,6 @@ 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_uint64 (&deposit->transaction_id), 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_wire), @@ -2497,14 +2482,11 @@ postgres_get_ready_deposit (void *cls, struct GNUNET_HashCode h_proposal_data; struct TALER_MerchantPublicKeyP merchant_pub; struct TALER_CoinSpendPublicKeyP coin_pub; - uint64_t transaction_id; uint64_t serial_id; json_t *wire; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("deposit_serial_id", &serial_id), - GNUNET_PQ_result_spec_uint64 ("transaction_id", - &transaction_id), TALER_PQ_result_spec_amount ("amount_with_fee", &amount_with_fee), TALER_PQ_result_spec_amount ("fee_deposit", @@ -2537,7 +2519,6 @@ postgres_get_ready_deposit (void *cls, &coin_pub, &amount_with_fee, &deposit_fee, - transaction_id, &h_proposal_data, wire_deadline, wire); @@ -2604,14 +2585,11 @@ postgres_iterate_matching_deposits (void *cls, struct GNUNET_TIME_Absolute wire_deadline; struct GNUNET_HashCode h_proposal_data; struct TALER_CoinSpendPublicKeyP coin_pub; - uint64_t transaction_id; uint64_t serial_id; int ret; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("deposit_serial_id", &serial_id), - GNUNET_PQ_result_spec_uint64 ("transaction_id", - &transaction_id), TALER_PQ_result_spec_amount ("amount_with_fee", &amount_with_fee), TALER_PQ_result_spec_amount ("fee_deposit", @@ -2639,7 +2617,6 @@ postgres_iterate_matching_deposits (void *cls, &coin_pub, &amount_with_fee, &deposit_fee, - transaction_id, &h_proposal_data, wire_deadline, NULL); @@ -2774,7 +2751,6 @@ postgres_insert_deposit (void *cls, int ret; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub), - GNUNET_PQ_query_param_uint64 (&deposit->transaction_id), TALER_PQ_query_param_amount (&deposit->amount_with_fee), GNUNET_PQ_query_param_absolute_time (&deposit->timestamp), GNUNET_PQ_query_param_absolute_time (&deposit->refund_deadline), @@ -2846,7 +2822,6 @@ postgres_insert_refund (void *cls, 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_uint64 (&refund->transaction_id), GNUNET_PQ_query_param_uint64 (&refund->rtransaction_id), TALER_PQ_query_param_amount (&refund->refund_amount), GNUNET_PQ_query_param_end @@ -3744,8 +3719,6 @@ postgres_get_coin_transactions (void *cls, deposit = GNUNET_new (struct TALER_EXCHANGEDB_Deposit); { struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_uint64 ("transaction_id", - &deposit->transaction_id), TALER_PQ_result_spec_amount ("amount_with_fee", &deposit->amount_with_fee), TALER_PQ_result_spec_amount ("fee_deposit", @@ -3904,8 +3877,6 @@ postgres_get_coin_transactions (void *cls, &refund->merchant_sig), GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", &refund->h_proposal_data), - GNUNET_PQ_result_spec_uint64 ("transaction_id", - &refund->transaction_id), GNUNET_PQ_result_spec_uint64 ("rtransaction_id", &refund->rtransaction_id), TALER_PQ_result_spec_amount ("amount_with_fee", @@ -4006,7 +3977,6 @@ postgres_lookup_wire_transfer (void *cls, struct GNUNET_HashCode h_wire; struct TALER_CoinSpendPublicKeyP coin_pub; struct TALER_MerchantPublicKeyP merchant_pub; - uint64_t transaction_id; struct GNUNET_TIME_Absolute exec_time; struct TALER_Amount amount_with_fee; struct TALER_Amount deposit_fee; @@ -4015,7 +3985,6 @@ postgres_lookup_wire_transfer (void *cls, GNUNET_PQ_result_spec_auto_from_type ("h_wire", &h_wire), GNUNET_PQ_result_spec_auto_from_type ("coin_pub", &coin_pub), GNUNET_PQ_result_spec_auto_from_type ("merchant_pub", &merchant_pub), - GNUNET_PQ_result_spec_uint64 ("transaction_id", &transaction_id), GNUNET_PQ_result_spec_absolute_time ("execution_time", &exec_time), TALER_PQ_result_spec_amount ("amount_with_fee", &amount_with_fee), TALER_PQ_result_spec_amount ("fee_deposit", &deposit_fee), @@ -4035,7 +4004,6 @@ postgres_lookup_wire_transfer (void *cls, &h_wire, exec_time, &h_proposal_data, - transaction_id, &coin_pub, &amount_with_fee, &deposit_fee); @@ -4056,7 +4024,6 @@ postgres_lookup_wire_transfer (void *cls, * @param h_wire hash of merchant wire details * @param coin_pub public key of deposited coin * @param merchant_pub merchant public key - * @param transaction_id transaction identifier * @param cb function to call with the result * @param cb_cls closure to pass to @a cb * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors, @@ -4069,7 +4036,6 @@ postgres_wire_lookup_deposit_wtid (void *cls, const struct GNUNET_HashCode *h_wire, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant_pub, - uint64_t transaction_id, TALER_EXCHANGEDB_TrackTransactionCallback cb, void *cb_cls) { @@ -4078,7 +4044,6 @@ postgres_wire_lookup_deposit_wtid (void *cls, 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_wire), - GNUNET_PQ_query_param_uint64 (&transaction_id), GNUNET_PQ_query_param_auto_from_type (merchant_pub), GNUNET_PQ_query_param_end }; @@ -4107,7 +4072,6 @@ 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_uint64 (&transaction_id), 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_wire), @@ -4532,8 +4496,6 @@ postgres_select_deposits_above_serial_id (void *cls, &deposit.coin.coin_pub), GNUNET_PQ_result_spec_auto_from_type ("coin_sig", &deposit.csig), - GNUNET_PQ_result_spec_uint64 ("transaction_id", - &deposit.transaction_id), GNUNET_PQ_result_spec_absolute_time ("refund_deadline", &deposit.refund_deadline), GNUNET_PQ_result_spec_absolute_time ("wire_deadline", @@ -4563,7 +4525,6 @@ postgres_select_deposits_above_serial_id (void *cls, &deposit.coin.coin_pub, &deposit.csig, &deposit.amount_with_fee, - deposit.transaction_id, &deposit.h_proposal_data, deposit.refund_deadline, deposit.wire_deadline, @@ -4725,8 +4686,6 @@ postgres_select_refunds_above_serial_id (void *cls, &refund.merchant_sig), GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", &refund.h_proposal_data), - GNUNET_PQ_result_spec_uint64 ("transaction_id", - &refund.transaction_id), GNUNET_PQ_result_spec_uint64 ("rtransaction_id", &refund.rtransaction_id), GNUNET_PQ_result_spec_auto_from_type ("coin_pub", @@ -4752,7 +4711,6 @@ postgres_select_refunds_above_serial_id (void *cls, &refund.merchant_pub, &refund.merchant_sig, &refund.h_proposal_data, - refund.transaction_id, refund.rtransaction_id, &refund.refund_amount); } diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 3d82436af..b8c6562d9 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -512,7 +512,6 @@ check_transfer_data (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 transaction_id unique transaction ID chosen by the merchant * @param h_proposal_data 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 @@ -787,7 +786,6 @@ cb_wt_never (void *cls, const struct GNUNET_HashCode *h_wire, struct GNUNET_TIME_Absolute exec_time, const struct GNUNET_HashCode *h_proposal_data, - uint64_t transaction_id, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *coin_value, const struct TALER_Amount *coin_fee) @@ -813,7 +811,6 @@ 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 uint64_t transaction_id_wt; static struct TALER_CoinSpendPublicKeyP coin_pub_wt; static struct TALER_Amount coin_value_wt; static struct TALER_Amount coin_fee_wt; @@ -831,7 +828,6 @@ cb_wt_check (void *cls, const struct GNUNET_HashCode *h_wire, struct GNUNET_TIME_Absolute exec_time, const struct GNUNET_HashCode *h_proposal_data, - uint64_t transaction_id, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *coin_value, const struct TALER_Amount *coin_fee) @@ -847,7 +843,6 @@ cb_wt_check (void *cls, GNUNET_assert (0 == memcmp (h_proposal_data, &h_proposal_data_wt, sizeof (struct GNUNET_HashCode))); - GNUNET_assert (transaction_id == transaction_id_wt); GNUNET_assert (0 == memcmp (coin_pub, &coin_pub_wt, sizeof (struct TALER_CoinSpendPublicKeyP))); @@ -899,7 +894,6 @@ 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 transaction_id unique transaction ID chosen by the merchant * @param h_proposal_data 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 @@ -914,7 +908,6 @@ deposit_cb (void *cls, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, - uint64_t transaction_id, const struct GNUNET_HashCode *h_proposal_data, struct GNUNET_TIME_Absolute wire_deadline, const json_t *wire) @@ -938,7 +931,6 @@ deposit_cb (void *cls, (0 != memcmp (coin_pub, &deposit->coin.coin_pub, sizeof (struct TALER_CoinSpendPublicKeyP))) || - (transaction_id != deposit->transaction_id) || ( (NULL != wire) && (0 != memcmp (&h_wire, &deposit->h_wire, @@ -960,7 +952,6 @@ 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 transaction_id unique transaction ID chosen by the merchant * @param h_proposal_data 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 @@ -977,7 +968,6 @@ audit_deposit_cb (void *cls, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendSignatureP *coin_sig, const struct TALER_Amount *amount_with_fee, - uint64_t transaction_id, const struct GNUNET_HashCode *h_proposal_data, struct GNUNET_TIME_Absolute refund_deadline, struct GNUNET_TIME_Absolute wire_deadline, @@ -1000,7 +990,6 @@ audit_deposit_cb (void *cls, * @param merchant_sig signature of the merchant * @param h_proposal_data hash of the proposal data in * the contract between merchant and customer - * @param transaction_id original transaction ID chosen by the merchant * @param rtransaction_id refund transaction ID chosen by the merchant * @param amount_with_fee amount that was deposited including fee * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop @@ -1012,7 +1001,6 @@ audit_refund_cb (void *cls, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_MerchantSignatureP *merchant_sig, const struct GNUNET_HashCode *h_proposal_data, - uint64_t transaction_id, uint64_t rtransaction_id, const struct TALER_Amount *amount_with_fee) { @@ -1348,8 +1336,6 @@ run (void *cls) TALER_JSON_hash (wire, &deposit.h_wire); deposit.receiver_wire_account = wire; - deposit.transaction_id = - GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); deposit.amount_with_fee = value; deposit.deposit_fee = fee_deposit; result = 8; @@ -1422,12 +1408,10 @@ run (void *cls) result = 10; deposit2 = deposit; - deposit2.transaction_id++; /* should fail if transaction id is different */ FAILIF (GNUNET_NO != plugin->have_deposit (plugin->cls, session, &deposit2)); - deposit2.transaction_id = deposit.transaction_id; RND_BLK (&deposit2.merchant_pub); /* should fail if merchant is different */ FAILIF (GNUNET_NO != plugin->have_deposit (plugin->cls, @@ -1447,7 +1431,6 @@ run (void *cls) refund.merchant_pub = deposit.merchant_pub; RND_BLK (&refund.merchant_sig); refund.h_proposal_data = deposit.h_proposal_data; - refund.transaction_id = deposit.transaction_id; 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; @@ -1496,7 +1479,6 @@ run (void *cls) &deposit.h_wire, sizeof (struct GNUNET_HashCode))); /* Note: not comparing 'wire', seems truly redundant and would be tricky */ - FAILIF (have->transaction_id != deposit.transaction_id); FAILIF (have->timestamp.abs_value_us != deposit.timestamp.abs_value_us); FAILIF (have->refund_deadline.abs_value_us != deposit.refund_deadline.abs_value_us); FAILIF (have->wire_deadline.abs_value_us != deposit.wire_deadline.abs_value_us); @@ -1535,7 +1517,6 @@ run (void *cls) FAILIF (0 != memcmp (&have->h_proposal_data, &refund.h_proposal_data, sizeof (struct GNUNET_HashCode))); - FAILIF (have->transaction_id != refund.transaction_id); FAILIF (have->rtransaction_id != refund.rtransaction_id); FAILIF (0 != TALER_amount_cmp (&have->refund_amount, &refund.refund_amount)); @@ -1562,7 +1543,6 @@ run (void *cls) h_wire_wt = deposit.h_wire; h_proposal_data_wt = deposit.h_proposal_data; coin_pub_wt = deposit.coin.coin_pub; - transaction_id_wt = deposit.transaction_id; execution_time_wt = GNUNET_TIME_absolute_get (); coin_value_wt = deposit.amount_with_fee; coin_fee_wt = fee_deposit; @@ -1583,7 +1563,6 @@ run (void *cls) &h_wire_wt, &coin_pub_wt, &merchant_pub_wt, - transaction_id_wt + 1 /* want UNKNOWN transaction here, hence + 1 */, &cb_wtid_never, NULL)); /* insert WT data */ @@ -1606,7 +1585,6 @@ run (void *cls) &h_wire_wt, &coin_pub_wt, &merchant_pub_wt, - transaction_id_wt, &cb_wtid_check, &cb_wtid_never)); FAILIF (GNUNET_OK != |