diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-23 14:57:00 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-23 14:57:00 +0200 |
commit | cdd2930a9951a552d221b8a8b8e9c0df35ad8be2 (patch) | |
tree | 2389f0cad26e47d2315650f2f9e698120c5f2182 /src/testing/testing_api_cmd_purse_deposit.c | |
parent | 2035294adbcafc93c70d2cb7d27ce1a74d5a61ca (diff) | |
download | exchange-cdd2930a9951a552d221b8a8b8e9c0df35ad8be2.tar.xz |
-misc fixes to reserve history
Diffstat (limited to 'src/testing/testing_api_cmd_purse_deposit.c')
-rw-r--r-- | src/testing/testing_api_cmd_purse_deposit.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_purse_deposit.c b/src/testing/testing_api_cmd_purse_deposit.c index b15ba97cf..86ed1b185 100644 --- a/src/testing/testing_api_cmd_purse_deposit.c +++ b/src/testing/testing_api_cmd_purse_deposit.c @@ -73,6 +73,12 @@ struct PurseDepositState struct TALER_PurseContractPublicKeyP purse_pub; /** + * The reserve we are being deposited into. + * Set as a trait once we know the reserve. + */ + struct TALER_ReservePublicKeyP reserve_pub; + + /** * PurseDeposit handle while operation is running. */ struct TALER_EXCHANGE_PurseDepositHandle *dh; @@ -151,6 +157,7 @@ deposit_cb (void *cls, { const struct TALER_TESTING_Command *purse_cmd; const struct TALER_ReserveSignatureP *reserve_sig; + const struct TALER_ReservePublicKeyP *reserve_pub; const struct GNUNET_TIME_Timestamp *merge_timestamp; purse_cmd = TALER_TESTING_interpreter_lookup_command (ds->is, @@ -165,6 +172,15 @@ deposit_cb (void *cls, return; } if (GNUNET_OK != + TALER_TESTING_get_trait_reserve_pub (purse_cmd, + &reserve_pub)) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (ds->is); + return; + } + ds->reserve_pub = *reserve_pub; + if (GNUNET_OK != TALER_TESTING_get_trait_timestamp (purse_cmd, 0, &merge_timestamp)) @@ -370,6 +386,7 @@ deposit_traits (void *cls, struct TALER_TESTING_Trait traits[] = { /* history entry MUST be first due to response code logic below! */ TALER_TESTING_make_trait_reserve_history (&ds->reserve_history), + TALER_TESTING_make_trait_reserve_pub (&ds->reserve_pub), TALER_TESTING_make_trait_purse_pub (&ds->purse_pub), TALER_TESTING_trait_end () }; |