remove /lock skeleton logic (#3625)

This commit is contained in:
Christian Grothoff 2015-09-14 11:56:37 +02:00
parent b04c5c7f30
commit 6501118f6c
5 changed files with 3 additions and 91 deletions

View File

@ -416,30 +416,6 @@ struct TALER_MINTDB_LinkDataList
};
/**
* @brief Specification for a /lock operation.
*/
struct TALER_MINTDB_LockOperation
{
/**
* Information about the coin that is being locked.
*/
struct TALER_CoinPublicInfo coin;
/**
* Signature over the locking operation.
*/
struct TALER_CoinSpendSignatureP coin_sig;
/**
* How much value is being locked?
*/
struct TALER_Amount amount;
// FIXME: more needed...
};
/**
* @brief Enumeration to classify the different types of transactions
* that can be done with a coin.
@ -454,12 +430,8 @@ enum TALER_MINTDB_TransactionType
/**
* /refresh/melt operation.
*/
TALER_MINTDB_TT_REFRESH_MELT = 1,
TALER_MINTDB_TT_REFRESH_MELT = 1
/**
* /lock operation.
*/
TALER_MINTDB_TT_LOCK = 2
};
@ -495,11 +467,6 @@ struct TALER_MINTDB_TransactionList
*/
struct TALER_MINTDB_RefreshMelt *melt;
/**
* Details if transaction was a /lock operation.
*/
struct TALER_MINTDB_LockOperation *lock;
} details;
};
@ -1124,38 +1091,6 @@ struct TALER_MINTDB_Plugin
void *tdc_cls);
/**
* Test if the given /lock request is known to us.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param sesssion database connection
* @param lock lock operation
* @return #GNUNET_YES if known,
* #GNUNET_NO if not,
* #GNUNET_SYSERR on internal error
*/
int
(*have_lock) (void *cls,
struct TALER_MINTDB_Session *sesssion,
const struct TALER_MINTDB_LockOperation *lock);
/**
* Store the given /lock request in the database.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param sesssion database connection
* @param lock lock operation
* @return #GNUNET_OK on success
* #GNUNET_SYSERR on internal error
*/
int
(*insert_lock) (void *cls,
struct TALER_MINTDB_Session *sesssion,
const struct TALER_MINTDB_LockOperation *lock);
/**
* Compile a list of all (historic) transactions performed
* with the given coin (/refresh/melt and /deposit operations).

View File

@ -67,15 +67,6 @@ calculate_transaction_list_totals (struct TALER_MINTDB_TransactionList *tl,
return GNUNET_SYSERR;
}
break;
case TALER_MINTDB_TT_LOCK:
/* should check if lock is still active,
and if it is for THIS operation; if
lock is inactive, delete it; if lock
is for THIS operation, ignore it;
if lock is for another operation,
count it! */
GNUNET_assert (0); // FIXME: not implemented! (#3625)
return GNUNET_SYSERR;
}
}
*ret = spent;

View File

@ -465,14 +465,6 @@ compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl)
&melt->coin_sig.eddsa_signature);
}
break;
case TALER_MINTDB_TT_LOCK:
{
type = "lock";
value = pos->details.lock->amount;
transaction = NULL;
GNUNET_break (0); /* #3625: Lock NOT implemented! */
break;
}
default:
GNUNET_assert (0);
}

View File

@ -107,10 +107,6 @@ common_free_coin_transaction_list (void *cls,
case TALER_MINTDB_TT_REFRESH_MELT:
GNUNET_free (list->details.melt);
break;
case TALER_MINTDB_TT_LOCK:
GNUNET_free (list->details.lock);
/* FIXME: look at this again once locking is implemented (#3625) */
break;
}
GNUNET_free (list);
list = next;

View File

@ -2666,7 +2666,7 @@ postgres_insert_refresh_commit_links (void *cls,
PQclear (result);
return GNUNET_SYSERR;
}
if (0 != strcmp ("1", PQcmdTuples (result)))
{
GNUNET_break (0);
@ -2734,7 +2734,7 @@ postgres_get_refresh_commit_links (void *cls,
&links[i].shared_secret_enc),
TALER_PQ_result_spec_end
};
if (GNUNET_YES !=
TALER_PQ_extract_result (result, rs, 0))
{
@ -3286,8 +3286,6 @@ libtaler_plugin_mintdb_postgres_init (void *cls)
plugin->get_link_data_list = &postgres_get_link_data_list;
plugin->free_link_data_list = &common_free_link_data_list;
plugin->get_transfer = &postgres_get_transfer;
// plugin->have_lock = &postgres_have_lock; /* #3625 */
// plugin->insert_lock = &postgres_insert_lock; /* #3625 */
plugin->get_coin_transactions = &postgres_get_coin_transactions;
plugin->free_coin_transaction_list = &common_free_coin_transaction_list;
return plugin;