diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-02-27 22:49:18 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-02-27 22:55:18 +0100 |
commit | 663f26a1a269d91e5d6ab2d9d5d01102d6ffd353 (patch) | |
tree | dac11467e1e82b1464263b13d87ab272cd464167 /src/bank-lib/testing_api_cmd_history.c | |
parent | cfab4194f08af08227d33d768d3e2001434bb6cd (diff) | |
download | exchange-663f26a1a269d91e5d6ab2d9d5d01102d6ffd353.tar.xz |
fix reject test command.
Diffstat (limited to 'src/bank-lib/testing_api_cmd_history.c')
-rw-r--r-- | src/bank-lib/testing_api_cmd_history.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/bank-lib/testing_api_cmd_history.c b/src/bank-lib/testing_api_cmd_history.c index 311c910d0..51d6ad3b2 100644 --- a/src/bank-lib/testing_api_cmd_history.c +++ b/src/bank-lib/testing_api_cmd_history.c @@ -112,24 +112,29 @@ test_cancelled (struct TALER_TESTING_Interpreter *is, unsigned int off) { const char *rejected_reference; + const struct TALER_TESTING_Command *current_cmd; + current_cmd = &is->commands[off]; + TALER_LOG_INFO ("Is `%s' rejected?\n", current_cmd->label); for (unsigned int i=0;i<is->ip;i++) { const struct TALER_TESTING_Command *c = &is->commands[i]; #warning "Errors reported here are NOT fatal" - /* We use the exposure of a reference to a reject - * command as a signal to understand if the current - * command was cancelled; so errors about "reject traits" - * not found are NOT fatal here */ - + /* Rejected wire transfers have hold a reference to a + * reject command to mark them as rejected. So errors + * about "reject traits" not found are NOT fatal here */ if (GNUNET_OK != TALER_TESTING_get_trait_rejected (c, 0, &rejected_reference)) continue; + + TALER_LOG_INFO ("Command `%s' was rejected by `%s'.\n", + current_cmd->label, + c->label); + if (0 == strcmp (rejected_reference, - TALER_TESTING_interpreter_get_current_label - (is))) + current_cmd->label)) return GNUNET_YES; } return GNUNET_NO; |