diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-16 11:55:47 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-16 11:55:47 +0200 |
commit | c8b9370413d6a330f3b457359ed309ac9e964533 (patch) | |
tree | 5ae6cc04d2d04731fdf802704ab2570dc3587040 /src/exchangedb/perf_taler_exchangedb_interpreter.c | |
parent | 068dbf020b1f762d4364ca378c1396d16fa6eb1a (diff) | |
download | exchange-c8b9370413d6a330f3b457359ed309ac9e964533.tar.xz |
fixing #3814 by removing ability to melt multiple oldcoins at the same time
Diffstat (limited to 'src/exchangedb/perf_taler_exchangedb_interpreter.c')
-rw-r--r-- | src/exchangedb/perf_taler_exchangedb_interpreter.c | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/src/exchangedb/perf_taler_exchangedb_interpreter.c b/src/exchangedb/perf_taler_exchangedb_interpreter.c index cb805a0b3..661cfeef3 100644 --- a/src/exchangedb/perf_taler_exchangedb_interpreter.c +++ b/src/exchangedb/perf_taler_exchangedb_interpreter.c @@ -101,13 +101,6 @@ data_free (struct PERF_TALER_EXCHANGEDB_Data *data) data->data.session_hash = NULL; break; - case PERF_TALER_EXCHANGEDB_REFRESH_MELT: - if (NULL == data->data.refresh_melt) - break; - PERF_TALER_EXCHANGEDB_refresh_melt_free (data->data.refresh_melt); - data->data.refresh_melt = NULL; - break; - case PERF_TALER_EXCHANGEDB_NONE: break; } @@ -158,11 +151,6 @@ data_copy (const struct PERF_TALER_EXCHANGEDB_Data *data, = *data->data.session_hash; break; - case PERF_TALER_EXCHANGEDB_REFRESH_MELT: - copy->data.refresh_melt - = PERF_TALER_EXCHANGEDB_refresh_melt_copy (data->data.refresh_melt); - break; - case PERF_TALER_EXCHANGEDB_NONE: break; } @@ -770,75 +758,6 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) } break; - case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT: - { - int ret; - - ret = cmd_find (cmd, - cmd[i].details.insert_refresh_melt.label_hash); - if (GNUNET_SYSERR == ret) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "%d:Undefined reference to %s\n", - i, - cmd[i].details.insert_refresh_melt.label_hash); - return GNUNET_SYSERR; - } - if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "%d:Wrong type reference to %s\n", - i, - cmd[i].details.insert_refresh_melt.label_hash); - return GNUNET_SYSERR; - } - cmd[i].details.insert_refresh_melt.index_hash = ret; - ret = cmd_find (cmd, - cmd[i].details.insert_refresh_melt.label_coin); - if (GNUNET_SYSERR == ret) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "%d:Undefined reference to %s\n", - i, - cmd[i].details.insert_refresh_melt.label_coin); - return GNUNET_SYSERR; - } - if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "%d:Wrong type reference to %s\n", - i, - cmd[i].details.insert_refresh_melt.label_coin); - return GNUNET_SYSERR; - } - cmd[i].details.insert_refresh_melt.index_coin = ret; } - break; - - case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT: - { - int ret; - ret = cmd_find (cmd, - cmd[i].details.get_refresh_melt.label_hash); - if (GNUNET_SYSERR == ret) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "%d:Undefined reference to %s\n", - i, - cmd[i].details.get_refresh_melt.label_hash); - return GNUNET_SYSERR; - } - if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "%d:Wrong type reference to %s\n", - i, - cmd[i].details.get_refresh_melt.label_hash); - return GNUNET_SYSERR; - } - cmd[i].details.get_refresh_melt.index_hash = ret; - } - break; - case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_ORDER: { int ret; @@ -1645,46 +1564,6 @@ interpret (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) } break; - case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT: - { - unsigned int hash_index; - unsigned int coin_index; - struct GNUNET_HashCode *hash; - struct TALER_EXCHANGEDB_RefreshMelt *melt; - struct PERF_TALER_EXCHANGEDB_Coin *coin; - - hash_index = state->cmd[state->i].details.insert_refresh_melt.index_hash; - coin_index = state->cmd[state->i].details.insert_refresh_melt.index_coin; - hash = state->cmd[hash_index].exposed.data.session_hash; - coin = state->cmd[coin_index].exposed.data.coin; - melt = PERF_TALER_EXCHANGEDB_refresh_melt_init (hash, - coin); - state->plugin->insert_refresh_melt (state->plugin->cls, - state->session, - 1, - melt); - } - break; - - case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT: - { - int ret; - unsigned int hash_index; - struct GNUNET_HashCode *hash; - struct TALER_EXCHANGEDB_RefreshMelt melt; - - hash_index = cmd_find (state->cmd, - state->cmd[state->i].details.get_refresh_melt.label_hash); - hash = state->cmd[hash_index].exposed.data.session_hash; - ret = state->plugin->get_refresh_melt (state->plugin->cls, - state->session, - hash, - 1, - &melt); - GNUNET_assert (GNUNET_SYSERR != ret); - } - break; - case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_ORDER: { unsigned int hash_index; |