diff options
Diffstat (limited to 'src/testing/testing_api_cmd_transfer_get.c')
-rw-r--r-- | src/testing/testing_api_cmd_transfer_get.c | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/src/testing/testing_api_cmd_transfer_get.c b/src/testing/testing_api_cmd_transfer_get.c index 699313e56..3ca319cb5 100644 --- a/src/testing/testing_api_cmd_transfer_get.c +++ b/src/testing/testing_api_cmd_transfer_get.c | |||
@@ -121,37 +121,18 @@ track_transfer_cleanup (void *cls, | |||
121 | * | 121 | * |
122 | * @param cls closure. | 122 | * @param cls closure. |
123 | * @param hr HTTP response details | 123 | * @param hr HTTP response details |
124 | * @param exchange_pub public key the exchange used for signing | 124 | * @param ta transfer data returned by the exchange |
125 | * the response. | ||
126 | * @param h_wire hash of the wire transfer address the transfer | ||
127 | * went to, or NULL on error. | ||
128 | * @param execution_time time when the exchange claims to have | ||
129 | * performed the wire transfer. | ||
130 | * @param total_amount total amount of the wire transfer, or NULL | ||
131 | * if the exchange could not provide any @a wtid (set only | ||
132 | * if @a http_status is "200 OK"). | ||
133 | * @param wire_fee wire fee that was charged by the exchange. | ||
134 | * @param details_length length of the @a details array. | ||
135 | * @param details array with details about the combined | ||
136 | * transactions. | ||
137 | */ | 125 | */ |
138 | static void | 126 | static void |
139 | track_transfer_cb (void *cls, | 127 | track_transfer_cb (void *cls, |
140 | const struct TALER_EXCHANGE_HttpResponse *hr, | 128 | const struct TALER_EXCHANGE_HttpResponse *hr, |
141 | const struct TALER_ExchangePublicKeyP *exchange_pub, | 129 | const struct TALER_EXCHANGE_TransferData *ta) |
142 | const struct GNUNET_HashCode *h_wire, | ||
143 | struct GNUNET_TIME_Absolute execution_time, | ||
144 | const struct TALER_Amount *total_amount, | ||
145 | const struct TALER_Amount *wire_fee, | ||
146 | unsigned int details_length, | ||
147 | const struct TALER_TrackTransferDetails *details) | ||
148 | { | 130 | { |
149 | struct TrackTransferState *tts = cls; | 131 | struct TrackTransferState *tts = cls; |
150 | struct TALER_TESTING_Interpreter *is = tts->is; | 132 | struct TALER_TESTING_Interpreter *is = tts->is; |
151 | struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; | 133 | struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; |
152 | struct TALER_Amount expected_amount; | 134 | struct TALER_Amount expected_amount; |
153 | 135 | ||
154 | (void) exchange_pub; | ||
155 | tts->tth = NULL; | 136 | tts->tth = NULL; |
156 | if (tts->expected_response_code != hr->http_status) | 137 | if (tts->expected_response_code != hr->http_status) |
157 | { | 138 | { |
@@ -193,14 +174,14 @@ track_transfer_cb (void *cls, | |||
193 | TALER_TESTING_interpreter_fail (is); | 174 | TALER_TESTING_interpreter_fail (is); |
194 | return; | 175 | return; |
195 | } | 176 | } |
196 | if (0 != TALER_amount_cmp (total_amount, | 177 | if (0 != TALER_amount_cmp (&ta->total_amount, |
197 | &expected_amount)) | 178 | &expected_amount)) |
198 | { | 179 | { |
199 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 180 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
200 | "Total amount mismatch to command %s - " | 181 | "Total amount mismatch to command %s - " |
201 | "%s vs %s\n", | 182 | "%s vs %s\n", |
202 | cmd->label, | 183 | cmd->label, |
203 | TALER_amount_to_string (total_amount), | 184 | TALER_amount_to_string (&ta->total_amount), |
204 | TALER_amount_to_string (&expected_amount)); | 185 | TALER_amount_to_string (&expected_amount)); |
205 | json_dumpf (hr->reply, | 186 | json_dumpf (hr->reply, |
206 | stderr, | 187 | stderr, |
@@ -219,7 +200,7 @@ track_transfer_cb (void *cls, | |||
219 | return; | 200 | return; |
220 | } | 201 | } |
221 | 202 | ||
222 | if (0 != TALER_amount_cmp (wire_fee, | 203 | if (0 != TALER_amount_cmp (&ta->wire_fee, |
223 | &expected_amount)) | 204 | &expected_amount)) |
224 | { | 205 | { |
225 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 206 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -266,7 +247,7 @@ track_transfer_cb (void *cls, | |||
266 | TALER_JSON_merchant_wire_signature_hash (wire_details, | 247 | TALER_JSON_merchant_wire_signature_hash (wire_details, |
267 | &h_wire_details)); | 248 | &h_wire_details)); |
268 | if (0 != GNUNET_memcmp (&h_wire_details, | 249 | if (0 != GNUNET_memcmp (&h_wire_details, |
269 | h_wire)) | 250 | &ta->h_wire)) |
270 | { | 251 | { |
271 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 252 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
272 | "Wire hash missmath to command %s\n", | 253 | "Wire hash missmath to command %s\n", |
@@ -301,7 +282,7 @@ track_transfer_cb (void *cls, | |||
301 | TALER_TESTING_interpreter_fail (is); | 282 | TALER_TESTING_interpreter_fail (is); |
302 | return; | 283 | return; |
303 | } | 284 | } |
304 | if (0 != TALER_amount_cmp (total_amount, | 285 | if (0 != TALER_amount_cmp (&ta->total_amount, |
305 | total_amount_from_reference)) | 286 | total_amount_from_reference)) |
306 | { | 287 | { |
307 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 288 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |