diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-06-10 11:07:06 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-06-10 11:07:06 +0200 |
commit | 70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436 (patch) | |
tree | 5f32b30f5b58dfc502c273bebecffbcb79fc3c4b /src/testing/testing_api_traits.c | |
parent | 46188ae07e97d12b73269167459707844b3c2486 (diff) | |
parent | d8f8c550bd7ad85f9da9bc5edba619e533eabcc8 (diff) | |
download | exchange-70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436.tar.xz |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/testing/testing_api_traits.c')
-rw-r--r-- | src/testing/testing_api_traits.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/testing/testing_api_traits.c b/src/testing/testing_api_traits.c index db94e81a5..d84e2c37e 100644 --- a/src/testing/testing_api_traits.c +++ b/src/testing/testing_api_traits.c @@ -67,7 +67,7 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, return GNUNET_OK; } } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trait %s/%u not found.\n", trait, index); @@ -75,4 +75,31 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, } +struct TALER_EXCHANGE_Handle * +TALER_TESTING_get_exchange (struct TALER_TESTING_Interpreter *is) +{ + struct TALER_EXCHANGE_Handle *exchange; + const struct TALER_TESTING_Command *exchange_cmd; + + exchange_cmd + = TALER_TESTING_interpreter_get_command (is, + "exchange"); + if (NULL == exchange_cmd) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return NULL; + } + if (GNUNET_OK != + TALER_TESTING_get_trait_exchange (exchange_cmd, + &exchange)) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return NULL; + } + return exchange; +} + + /* end of testing_api_traits.c */ |