summaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/baseline/deposit.req2
-rw-r--r--src/exchange-lib/exchange_api_common.c2
-rw-r--r--src/exchange-lib/exchange_api_deposit.c10
-rw-r--r--src/exchange-lib/exchange_api_refund.c7
-rw-r--r--src/exchange-lib/exchange_api_track_transaction.c7
-rw-r--r--src/exchange-lib/exchange_api_track_transfer.c2
-rw-r--r--src/exchange-lib/test_exchange_api.c48
7 files changed, 19 insertions, 59 deletions
diff --git a/src/exchange-lib/baseline/deposit.req b/src/exchange-lib/baseline/deposit.req
index 3cf6e4ac0..6518e76fe 100644
--- a/src/exchange-lib/baseline/deposit.req
+++ b/src/exchange-lib/baseline/deposit.req
@@ -5,4 +5,4 @@ Content-Type: application/json
Content-Length: 1658
Expect: 100-continue
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/Date(1442821652)/","f":{"currency":"EUR","value":5,"fraction":0},"wire":{"type":"TEST","bank":"dest bank","account":42},"coin_pub":"JXWK4NS0H2W4V4BETQ90CCEDADP6QQ3MV3YZ7RV2KXEM8PWXE8Q0","H_wire":"YQED9FDYPKK2QQYB3FS19Y15ZMKBAXJP2C73CXASAF1KM6ZYY723TEJ3HBR6D864A7X5W58G92QJ0A9PFMZNB81ZP9NJAQQCCABM4RG","h_proposal_data":"1CMEEFQ5S4QJGGAMVYFV07XQRHQA311CR2MTRNC5M9KZV6ETDV1SY00WJFEV2CG9BXQTEQPZAF8A54C2HX32TZCN20VBGPFPS2Z16B0","merchant_pub":"C36TEXQXFW00170C2EJ66ZR0000CX9VPZNZG00109NX020000000","denom_pub":"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30GT58S2K2HJ16H336C9N8CVK4E9N6H1MADHH61330HHM6N1K8E1H8RVKJH256D1M6E1K8RWKJGSH8S2M6DJ170TK2H266GTK8DSS64RKJDJ26D144DJ474SK0GHQ711MAD9G752M2CJ58S1KJDA570SK2E9G8N23GCJ28S146DHH610K2H1Q8CW3GGA16S146H9G68TKACSQ6914CE1H691K2E9N6RWM8H9P8CWM2H9S8GSK0H9P6D1K6H9G6X0M4C2171144HJ46N334H9J692M4H9M8MR4CCJ46GRKEGA46533CDJ38MV4CH9K892MAH1P8S2K6D9K6N246E256H244G9Q6D346GJ56S23JGHJ690KADHJ8H242H2575132CSM6X1M4G9N6RR48E9H8MVM8E9354520818CMG26C1H60R30C935452081918G2J2G0","transaction_id":1,"refund_deadline":"/Date(0)/","coin_sig":"X16E0DP8C2BJNVNX09G24FFC5GA4W7RN2YXZP9WJTAN9BY6B4GMA39QNYR51XNNEZ3H1J7TP0K9G55JZ8V7WS7CZMD7E64HWYBFWM00"} \ No newline at end of file
+{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/Date(1442821652)/","f":{"currency":"EUR","value":5,"fraction":0},"wire":{"type":"TEST","bank":"dest bank","account":42},"coin_pub":"JXWK4NS0H2W4V4BETQ90CCEDADP6QQ3MV3YZ7RV2KXEM8PWXE8Q0","H_wire":"YQED9FDYPKK2QQYB3FS19Y15ZMKBAXJP2C73CXASAF1KM6ZYY723TEJ3HBR6D864A7X5W58G92QJ0A9PFMZNB81ZP9NJAQQCCABM4RG","h_proposal_data":"1CMEEFQ5S4QJGGAMVYFV07XQRHQA311CR2MTRNC5M9KZV6ETDV1SY00WJFEV2CG9BXQTEQPZAF8A54C2HX32TZCN20VBGPFPS2Z16B0","merchant_pub":"C36TEXQXFW00170C2EJ66ZR0000CX9VPZNZG00109NX020000000","denom_pub":"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30GT58S2K2HJ16H336C9N8CVK4E9N6H1MADHH61330HHM6N1K8E1H8RVKJH256D1M6E1K8RWKJGSH8S2M6DJ170TK2H266GTK8DSS64RKJDJ26D144DJ474SK0GHQ711MAD9G752M2CJ58S1KJDA570SK2E9G8N23GCJ28S146DHH610K2H1Q8CW3GGA16S146H9G68TKACSQ6914CE1H691K2E9N6RWM8H9P8CWM2H9S8GSK0H9P6D1K6H9G6X0M4C2171144HJ46N334H9J692M4H9M8MR4CCJ46GRKEGA46533CDJ38MV4CH9K892MAH1P8S2K6D9K6N246E256H244G9Q6D346GJ56S23JGHJ690KADHJ8H242H2575132CSM6X1M4G9N6RR48E9H8MVM8E9354520818CMG26C1H60R30C935452081918G2J2G0","refund_deadline":"/Date(0)/","coin_sig":"X16E0DP8C2BJNVNX09G24FFC5GA4W7RN2YXZP9WJTAN9BY6B4GMA39QNYR51XNNEZ3H1J7TP0K9G55JZ8V7WS7CZMD7E64HWYBFWM00"}
diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c
index 0d1110bd4..743fb4fe2 100644
--- a/src/exchange-lib/exchange_api_common.c
+++ b/src/exchange-lib/exchange_api_common.c
@@ -226,7 +226,7 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
return GNUNET_SYSERR;
}
/* NOTE/FIXME: theoretically, we could also check that the given
- transaction_id and merchant_pub and h_proposal_data appear in the
+ merchant_pub and h_proposal_data appear in the
history under deposits. However, there is really no benefit
for the exchange to lie here, so not checking is probably OK
(an auditor ought to check, though). Then again, we similarly
diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c
index 1fc9af6fd..7eb6f5b79 100644
--- a/src/exchange-lib/exchange_api_deposit.c
+++ b/src/exchange-lib/exchange_api_deposit.c
@@ -279,7 +279,6 @@ handle_deposit_finished (void *cls,
* @param denom_pub denomination key with which the coin is signed
* @param denom_sig exchange’s unblinded signature of the coin
* @param timestamp timestamp when the deposit was finalized
- * @param transaction_id transaction id for the transaction between merchant and customer
* @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests)
* @param refund_deadline date until which the merchant can issue a refund to the customer via the exchange (can be zero if refunds are not allowed)
* @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key.
@@ -294,7 +293,6 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
const struct TALER_DenominationSignature *denom_sig,
const struct TALER_DenominationPublicKey *denom_pub,
struct GNUNET_TIME_Absolute timestamp,
- uint64_t transaction_id,
const struct TALER_MerchantPublicKeyP *merchant_pub,
struct GNUNET_TIME_Absolute refund_deadline,
const struct TALER_CoinSpendSignatureP *coin_sig)
@@ -308,7 +306,6 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
dr.h_wire = *h_wire;
dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
- dr.transaction_id = GNUNET_htonll (transaction_id);
TALER_amount_hton (&dr.amount_with_fee,
amount);
TALER_amount_hton (&dr.deposit_fee,
@@ -379,7 +376,6 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
* @param denom_pub denomination key with which the coin is signed
* @param denom_sig exchange’s unblinded signature of the coin
* @param timestamp timestamp when the contract was finalized, must not be too far in the future
- * @param transaction_id transaction id for the transaction between merchant and customer
* @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests)
* @param refund_deadline date until which the merchant can issue a refund to the customer via the exchange (can be zero if refunds are not allowed); must not be after the @a wire_deadline
* @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key.
@@ -398,7 +394,6 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_DenominationSignature *denom_sig,
const struct TALER_DenominationPublicKey *denom_pub,
struct GNUNET_TIME_Absolute timestamp,
- uint64_t transaction_id,
const struct TALER_MerchantPublicKeyP *merchant_pub,
struct GNUNET_TIME_Absolute refund_deadline,
const struct TALER_CoinSpendSignatureP *coin_sig,
@@ -440,7 +435,6 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
denom_sig,
denom_pub,
timestamp,
- transaction_id,
merchant_pub,
refund_deadline,
coin_sig))
@@ -453,7 +447,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
" s:o, s:o," /* H_wire, h_proposal_data */
" s:o, s:o," /* coin_pub, denom_pub */
" s:o, s:o," /* ub_sig, timestamp */
- " s:I, s:o," /* transaction id, merchant_pub */
+ " s:o," /* merchant_pub */
" s:o, s:o," /* refund_deadline, wire_deadline */
" s:o}", /* coin_sig */
"f", TALER_JSON_from_amount (amount),
@@ -464,7 +458,6 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
"denom_pub", GNUNET_JSON_from_rsa_public_key (denom_pub->rsa_public_key),
"ub_sig", GNUNET_JSON_from_rsa_signature (denom_sig->rsa_signature),
"timestamp", GNUNET_JSON_from_time_abs (timestamp),
- "transaction_id", (json_int_t) transaction_id,
"merchant_pub", GNUNET_JSON_from_data_auto (merchant_pub),
"refund_deadline", GNUNET_JSON_from_time_abs (refund_deadline),
"wire_transfer_deadline", GNUNET_JSON_from_time_abs (wire_deadline),
@@ -480,7 +473,6 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
dh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT);
dh->depconf.h_proposal_data = *h_proposal_data;
dh->depconf.h_wire = h_wire;
- dh->depconf.transaction_id = GNUNET_htonll (transaction_id);
dh->depconf.timestamp = GNUNET_TIME_absolute_hton (timestamp);
dh->depconf.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
TALER_amount_hton (&dh->depconf.amount_without_fee,
diff --git a/src/exchange-lib/exchange_api_refund.c b/src/exchange-lib/exchange_api_refund.c
index 3f08e1597..4a0cac5b5 100644
--- a/src/exchange-lib/exchange_api_refund.c
+++ b/src/exchange-lib/exchange_api_refund.c
@@ -221,7 +221,6 @@ handle_refund_finished (void *cls,
* (with deposit fee) of the original deposit contribution of this coin
* @param refund_fee fee applicable to this coin for the refund
* @param h_proposal_data hash of the contact of the merchant with the customer that is being refunded
- * @param transaction_id transaction id for the transaction being refunded, must match @a h_proposal_data
* @param coin_pub coin’s public key of the coin from the original deposit operation
* @param rtransaction_id transaction id for the transaction between merchant and customer (of refunding operation);
* this is needed as we may first do a partial refund and later a full refund. If both
@@ -238,7 +237,6 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_Amount *amount,
const struct TALER_Amount *refund_fee,
const struct GNUNET_HashCode *h_proposal_data,
- uint64_t transaction_id,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
uint64_t rtransaction_id,
const struct TALER_MerchantPrivateKeyP *merchant_priv,
@@ -257,7 +255,6 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
rr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND);
rr.purpose.size = htonl (sizeof (struct TALER_RefundRequestPS));
rr.h_proposal_data = *h_proposal_data;
- rr.transaction_id = GNUNET_htonll (transaction_id);
rr.coin_pub = *coin_pub;
GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv->eddsa_priv,
&rr.merchant.eddsa_pub);
@@ -272,13 +269,12 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
&merchant_sig.eddsa_sig));
refund_obj = json_pack ("{s:o, s:o," /* amount/fee */
" s:o, s:o," /* h_proposal_data, coin_pub */
- " s:I, s:I," /* transaction id, rtransaction id */
+ " s:I," /* rtransaction id */
" s:o, s:o}", /* merchant_pub, merchant_sig */
"refund_amount", TALER_JSON_from_amount (amount),
"refund_fee", TALER_JSON_from_amount (refund_fee),
"h_proposal_data", GNUNET_JSON_from_data_auto (h_proposal_data),
"coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
- "transaction_id", (json_int_t) transaction_id,
"rtransaction_id", (json_int_t) rtransaction_id,
"merchant_pub", GNUNET_JSON_from_data_auto (&rr.merchant),
"merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig)
@@ -293,7 +289,6 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
rh->depconf.purpose.size = htonl (sizeof (struct TALER_RefundConfirmationPS));
rh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND);
rh->depconf.h_proposal_data = *h_proposal_data;
- rh->depconf.transaction_id = GNUNET_htonll (transaction_id);
rh->depconf.coin_pub = *coin_pub;
rh->depconf.merchant = rr.merchant;
rh->depconf.rtransaction_id = GNUNET_htonll (rtransaction_id);
diff --git a/src/exchange-lib/exchange_api_track_transaction.c b/src/exchange-lib/exchange_api_track_transaction.c
index c40f2174e..9b6382165 100644
--- a/src/exchange-lib/exchange_api_track_transaction.c
+++ b/src/exchange-lib/exchange_api_track_transaction.c
@@ -257,7 +257,6 @@ handle_deposit_wtid_finished (void *cls,
* @param h_proposal_data hash of the proposal data from the contract
* between merchant and customer
* @param coin_pub public key of the coin
- * @param transaction_id transaction identifier
* @param cb function to call with the result
* @param cb_cls closure for @a cb
* @return handle to abort request
@@ -268,7 +267,6 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
const struct GNUNET_HashCode *h_wire,
const struct GNUNET_HashCode *h_proposal_data,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
- uint64_t transaction_id,
TALER_EXCHANGE_TrackTransactionCallback cb,
void *cb_cls)
{
@@ -289,7 +287,6 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
dtp.purpose.size = htonl (sizeof (dtp));
dtp.h_proposal_data = *h_proposal_data;
dtp.h_wire = *h_wire;
- dtp.transaction_id = GNUNET_htonll (transaction_id);
GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv->eddsa_priv,
&dtp.merchant.eddsa_pub);
@@ -299,12 +296,11 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
&dtp.purpose,
&merchant_sig.eddsa_sig));
deposit_wtid_obj = json_pack ("{s:o, s:o," /* H_wire, h_proposal_data */
- " s:o, s:I," /* coin_pub, transaction_id */
+ " s:o," /* coin_pub */
" s:o, s:o}", /* merchant_pub, merchant_sig */
"H_wire", GNUNET_JSON_from_data_auto (h_wire),
"h_proposal_data", GNUNET_JSON_from_data_auto (h_proposal_data),
"coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
- "transaction_id", (json_int_t) transaction_id,
"merchant_pub", GNUNET_JSON_from_data_auto (&dtp.merchant),
"merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig));
@@ -318,7 +314,6 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
dwh->depconf.h_wire = *h_wire;
dwh->depconf.h_proposal_data = *h_proposal_data;
dwh->depconf.coin_pub = *coin_pub;
- dwh->depconf.transaction_id = GNUNET_htonll (transaction_id);
eh = curl_easy_init ();
GNUNET_assert (NULL != (dwh->json_enc =
diff --git a/src/exchange-lib/exchange_api_track_transfer.c b/src/exchange-lib/exchange_api_track_transfer.c
index 89206e235..819a00adf 100644
--- a/src/exchange-lib/exchange_api_track_transfer.c
+++ b/src/exchange-lib/exchange_api_track_transfer.c
@@ -125,7 +125,6 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
struct json_t *detail_j = json_array_get (details_j, i);
struct GNUNET_JSON_Specification spec_detail[] = {
GNUNET_JSON_spec_fixed_auto ("h_proposal_data", &detail->h_proposal_data),
- GNUNET_JSON_spec_uint64 ("transaction_id", &detail->transaction_id),
GNUNET_JSON_spec_fixed_auto ("coin_pub", &detail->coin_pub),
TALER_JSON_spec_amount ("deposit_value", &detail->coin_value),
TALER_JSON_spec_amount ("deposit_fee", &detail->coin_fee),
@@ -145,7 +144,6 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
/* build up big hash for signature checking later */
dd.h_proposal_data = detail->h_proposal_data;
dd.execution_time = GNUNET_TIME_absolute_hton (exec_time);
- dd.transaction_id = GNUNET_htonll (detail->transaction_id);
dd.coin_pub = detail->coin_pub;
TALER_amount_hton (&dd.deposit_value,
&detail->coin_value);
diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c
index d15459e4d..ee39c1913 100644
--- a/src/exchange-lib/test_exchange_api.c
+++ b/src/exchange-lib/test_exchange_api.c
@@ -376,11 +376,6 @@ struct Command
const char *proposal_data;
/**
- * Transaction ID to use.
- */
- uint64_t transaction_id;
-
- /**
* Relative time (to add to 'now') to compute the refund deadline.
* Zero for no refunds.
*/
@@ -1991,7 +1986,6 @@ interpreter_run (void *cls)
&dr.h_wire);
dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
- dr.transaction_id = GNUNET_htonll (cmd->details.deposit.transaction_id);
TALER_amount_hton (&dr.amount_with_fee,
&amount);
TALER_amount_hton (&dr.deposit_fee,
@@ -2013,7 +2007,6 @@ interpreter_run (void *cls)
coin_pk_sig,
&coin_pk->key,
timestamp,
- cmd->details.deposit.transaction_id,
&merchant_pub,
refund_deadline,
&coin_sig,
@@ -2231,14 +2224,13 @@ interpreter_run (void *cls)
&h_proposal_data);
json_decref (proposal_data);
cmd->details.deposit_wtid.dwh
- = TALER_EXCHANGE_track_transaction (exchange,
- &ref->details.deposit.merchant_priv,
- &h_wire,
- &h_proposal_data,
- &coin_pub,
- ref->details.deposit.transaction_id,
- &deposit_wtid_cb,
- is);
+ = TALER_EXCHANGE_track_transaction (exchange,
+ &ref->details.deposit.merchant_priv,
+ &h_wire,
+ &h_proposal_data,
+ &coin_pub,
+ &deposit_wtid_cb,
+ is);
}
return;
case OC_RUN_AGGREGATOR:
@@ -2358,7 +2350,6 @@ interpreter_run (void *cls)
&amount,
&refund_fee,
&h_proposal_data,
- ref->details.deposit.transaction_id,
&coin_pub,
cmd->details.refund.rtransaction_id,
&ref->details.deposit.merchant_priv,
@@ -2761,8 +2752,7 @@ run (void *cls)
.details.deposit.amount = "EUR:5",
.details.deposit.coin_ref = "withdraw-coin-1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
- .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }",
- .details.deposit.transaction_id = 1 },
+ .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }" },
/* Try to overdraw funds ... */
{ .oc = OC_WITHDRAW_SIGN,
@@ -2778,8 +2768,7 @@ run (void *cls)
.details.deposit.amount = "EUR:5",
.details.deposit.coin_ref = "withdraw-coin-1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":43 }",
- .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }",
- .details.deposit.transaction_id = 1 },
+ .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }" },
/* Try to double-spend the 5 EUR coin at the same merchant (but different
transaction ID) */
{ .oc = OC_DEPOSIT,
@@ -2788,8 +2777,7 @@ run (void *cls)
.details.deposit.amount = "EUR:5",
.details.deposit.coin_ref = "withdraw-coin-1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
- .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }",
- .details.deposit.transaction_id = 2 },
+ .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }" },
/* Try to double-spend the 5 EUR coin at the same merchant (but different
proposal) */
{ .oc = OC_DEPOSIT,
@@ -2798,8 +2786,7 @@ run (void *cls)
.details.deposit.amount = "EUR:5",
.details.deposit.coin_ref = "withdraw-coin-1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
- .details.deposit.proposal_data = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":2 } ] }",
- .details.deposit.transaction_id = 1 },
+ .details.deposit.proposal_data = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":2 } ] }" },
/* ***************** /refresh testing ******************** */
@@ -2824,8 +2811,7 @@ run (void *cls)
.details.deposit.amount = "EUR:1",
.details.deposit.coin_ref = "refresh-withdraw-coin-1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
- .details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"ice cream\", \"value\":\"EUR:1\" } ] }",
- .details.deposit.transaction_id = 42421 },
+ .details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"ice cream\", \"value\":\"EUR:1\" } ] }" },
/* Melt the rest of the coin's value (EUR:4.00 = 3x EUR:1.03 + 7x EUR:0.13) */
@@ -2866,8 +2852,7 @@ run (void *cls)
.details.deposit.coin_ref = "refresh-reveal-1-idempotency",
.details.deposit.coin_idx = 0,
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
- .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }",
- .details.deposit.transaction_id = 2 },
+ .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }" },
/* Test successfully spending coins from the refresh operation:
finally EUR:0.1 */
@@ -2878,8 +2863,7 @@ run (void *cls)
.details.deposit.coin_ref = "refresh-reveal-1",
.details.deposit.coin_idx = 4,
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":43 }",
- .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }",
- .details.deposit.transaction_id = 2 },
+ .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }" },
/* Test running a failing melt operation (same operation again must fail) */
{ .oc = OC_REFRESH_MELT,
@@ -2995,7 +2979,6 @@ run (void *cls)
.details.deposit.coin_ref = "withdraw-coin-r1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
.details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"ice cream\", \"value\":\"EUR:5\" } ] }",
- .details.deposit.transaction_id = 424210,
.details.deposit.refund_deadline = { 60LL * 1000 * 1000 } /* 60 s */,
},
/* Run transfers. Should do nothing as refund deadline blocks it */
@@ -3011,7 +2994,6 @@ run (void *cls)
.details.refund.amount = "EUR:5",
.details.refund.fee = "EUR:0.01",
.details.refund.deposit_ref = "deposit-refund-1",
- .details.refund.rtransaction_id = 1
},
/* Spend 4.99 EUR of the refunded 4.99 EUR coin (1ct gone due to refund)
(merchant would receive EUR:4.98 due to 1 ct deposit fee) */
@@ -3022,7 +3004,6 @@ run (void *cls)
.details.deposit.coin_ref = "withdraw-coin-r1",
.details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }",
.details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"more ice cream\", \"value\":\"EUR:5\" } ] }",
- .details.deposit.transaction_id = 424211,
},
/* Run transfers. This will do the transfer as refund deadline was 0 */
{ .oc = OC_RUN_AGGREGATOR,
@@ -3041,7 +3022,6 @@ run (void *cls)
.details.refund.amount = "EUR:4.99",
.details.refund.fee = "EUR:0.01",
.details.refund.deposit_ref = "deposit-refund-2",
- .details.refund.rtransaction_id = 2
},
#endif