return execution time also from exchange C API (#4578)
This commit is contained in:
parent
302a08b701
commit
df8c011b95
@ -86,6 +86,7 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
|
|||||||
{
|
{
|
||||||
json_t *details_j;
|
json_t *details_j;
|
||||||
struct GNUNET_HashCode h_wire;
|
struct GNUNET_HashCode h_wire;
|
||||||
|
struct GNUNET_TIME_Absolute exec_time;
|
||||||
struct TALER_Amount total_amount;
|
struct TALER_Amount total_amount;
|
||||||
struct TALER_MerchantPublicKeyP merchant_pub;
|
struct TALER_MerchantPublicKeyP merchant_pub;
|
||||||
unsigned int num_details;
|
unsigned int num_details;
|
||||||
@ -95,6 +96,7 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
|
|||||||
TALER_JSON_spec_amount ("total", &total_amount),
|
TALER_JSON_spec_amount ("total", &total_amount),
|
||||||
GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub),
|
GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub),
|
||||||
GNUNET_JSON_spec_fixed_auto ("H_wire", &h_wire),
|
GNUNET_JSON_spec_fixed_auto ("H_wire", &h_wire),
|
||||||
|
GNUNET_JSON_spec_absolute_time ("execution_time", &exec_time),
|
||||||
GNUNET_JSON_spec_json ("deposits", &details_j),
|
GNUNET_JSON_spec_json ("deposits", &details_j),
|
||||||
GNUNET_JSON_spec_fixed_auto ("exchange_sig", &exchange_sig),
|
GNUNET_JSON_spec_fixed_auto ("exchange_sig", &exchange_sig),
|
||||||
GNUNET_JSON_spec_fixed_auto ("exchange_pub", &exchange_pub),
|
GNUNET_JSON_spec_fixed_auto ("exchange_pub", &exchange_pub),
|
||||||
@ -183,6 +185,7 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
|
|||||||
&exchange_pub,
|
&exchange_pub,
|
||||||
json,
|
json,
|
||||||
&h_wire,
|
&h_wire,
|
||||||
|
exec_time,
|
||||||
&total_amount,
|
&total_amount,
|
||||||
num_details,
|
num_details,
|
||||||
details);
|
details);
|
||||||
@ -251,7 +254,10 @@ handle_track_transfer_finished (void *cls,
|
|||||||
response_code,
|
response_code,
|
||||||
NULL,
|
NULL,
|
||||||
json,
|
json,
|
||||||
NULL, NULL, 0, NULL);
|
NULL,
|
||||||
|
GNUNET_TIME_UNIT_ZERO_ABS,
|
||||||
|
NULL,
|
||||||
|
0, NULL);
|
||||||
TALER_EXCHANGE_track_transfer_cancel (wdh);
|
TALER_EXCHANGE_track_transfer_cancel (wdh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1394,8 +1394,8 @@ wire_cb (void *cls,
|
|||||||
* @param exchange_pub public key the exchange used for signing
|
* @param exchange_pub public key the exchange used for signing
|
||||||
* @param json original json reply (may include signatures, those have then been
|
* @param json original json reply (may include signatures, those have then been
|
||||||
* validated already)
|
* validated already)
|
||||||
* @param wtid extracted wire transfer identifier, or NULL if the exchange could
|
* @param h_wire hash of the wire transfer address the transfer went to, or NULL on error
|
||||||
* not provide any (set only if @a http_status is #MHD_HTTP_OK)
|
* @param execution_time time when the exchange claims to have performed the wire transfer
|
||||||
* @param total_amount total amount of the wire transfer, or NULL if the exchange could
|
* @param total_amount total amount of the wire transfer, or NULL if the exchange could
|
||||||
* not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK)
|
* not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK)
|
||||||
* @param details_length length of the @a details array
|
* @param details_length length of the @a details array
|
||||||
@ -1407,6 +1407,7 @@ wire_deposits_cb (void *cls,
|
|||||||
const struct TALER_ExchangePublicKeyP *exchange_pub,
|
const struct TALER_ExchangePublicKeyP *exchange_pub,
|
||||||
const json_t *json,
|
const json_t *json,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
|
struct GNUNET_TIME_Absolute execution_time,
|
||||||
const struct TALER_Amount *total_amount,
|
const struct TALER_Amount *total_amount,
|
||||||
unsigned int details_length,
|
unsigned int details_length,
|
||||||
const struct TALER_TrackTransferDetails *details)
|
const struct TALER_TrackTransferDetails *details)
|
||||||
|
@ -708,6 +708,7 @@ static void
|
|||||||
cb_wt_never (void *cls,
|
cb_wt_never (void *cls,
|
||||||
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
|
struct GNUNET_TIME_Absolute exec_time,
|
||||||
const struct GNUNET_HashCode *h_contract,
|
const struct GNUNET_HashCode *h_contract,
|
||||||
uint64_t transaction_id,
|
uint64_t transaction_id,
|
||||||
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
@ -751,6 +752,7 @@ static void
|
|||||||
cb_wt_check (void *cls,
|
cb_wt_check (void *cls,
|
||||||
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
|
struct GNUNET_TIME_Absolute exec_time,
|
||||||
const struct GNUNET_HashCode *h_contract,
|
const struct GNUNET_HashCode *h_contract,
|
||||||
uint64_t transaction_id,
|
uint64_t transaction_id,
|
||||||
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
@ -764,6 +766,7 @@ cb_wt_check (void *cls,
|
|||||||
GNUNET_assert (0 == memcmp (h_wire,
|
GNUNET_assert (0 == memcmp (h_wire,
|
||||||
&h_wire_wt,
|
&h_wire_wt,
|
||||||
sizeof (struct GNUNET_HashCode)));
|
sizeof (struct GNUNET_HashCode)));
|
||||||
|
GNUNET_assert (exec_time.abs_value_us == execution_time_wt.abs_value_us);
|
||||||
GNUNET_assert (0 == memcmp (h_contract,
|
GNUNET_assert (0 == memcmp (h_contract,
|
||||||
&h_contract_wt,
|
&h_contract_wt,
|
||||||
sizeof (struct GNUNET_HashCode)));
|
sizeof (struct GNUNET_HashCode)));
|
||||||
|
@ -908,7 +908,6 @@ TALER_EXCHANGE_refresh_melt_cancel (struct TALER_EXCHANGE_RefreshMeltHandle *rmh
|
|||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_RefreshRevealCallback) (void *cls,
|
(*TALER_EXCHANGE_RefreshRevealCallback) (void *cls,
|
||||||
unsigned int http_status,
|
unsigned int http_status,
|
||||||
|
|
||||||
unsigned int num_coins,
|
unsigned int num_coins,
|
||||||
const struct TALER_CoinSpendPrivateKeyP *coin_privs,
|
const struct TALER_CoinSpendPrivateKeyP *coin_privs,
|
||||||
const struct TALER_DenominationSignature *sigs,
|
const struct TALER_DenominationSignature *sigs,
|
||||||
@ -1113,6 +1112,7 @@ struct TALER_EXCHANGE_TrackTransferHandle;
|
|||||||
* @param json original json reply (may include signatures, those have then been
|
* @param json original json reply (may include signatures, those have then been
|
||||||
* validated already)
|
* validated already)
|
||||||
* @param h_wire hash of the wire transfer address the transfer went to, or NULL on error
|
* @param h_wire hash of the wire transfer address the transfer went to, or NULL on error
|
||||||
|
* @param execution_time time when the exchange claims to have performed the wire transfer
|
||||||
* @param total_amount total amount of the wire transfer, or NULL if the exchange could
|
* @param total_amount total amount of the wire transfer, or NULL if the exchange could
|
||||||
* not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK)
|
* not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK)
|
||||||
* @param details_length length of the @a details array
|
* @param details_length length of the @a details array
|
||||||
@ -1124,6 +1124,7 @@ typedef void
|
|||||||
const struct TALER_ExchangePublicKeyP *sign_key,
|
const struct TALER_ExchangePublicKeyP *sign_key,
|
||||||
const json_t *json,
|
const json_t *json,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
|
struct GNUNET_TIME_Absolute execution_time,
|
||||||
const struct TALER_Amount *total_amount,
|
const struct TALER_Amount *total_amount,
|
||||||
unsigned int details_length,
|
unsigned int details_length,
|
||||||
const struct TALER_TrackTransferDetails *details);
|
const struct TALER_TrackTransferDetails *details);
|
||||||
|
Loading…
Reference in New Issue
Block a user