remove /lock skeleton logic (#3625)
This commit is contained in:
parent
b04c5c7f30
commit
6501118f6c
@ -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
|
* @brief Enumeration to classify the different types of transactions
|
||||||
* that can be done with a coin.
|
* that can be done with a coin.
|
||||||
@ -454,12 +430,8 @@ enum TALER_MINTDB_TransactionType
|
|||||||
/**
|
/**
|
||||||
* /refresh/melt operation.
|
* /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;
|
struct TALER_MINTDB_RefreshMelt *melt;
|
||||||
|
|
||||||
/**
|
|
||||||
* Details if transaction was a /lock operation.
|
|
||||||
*/
|
|
||||||
struct TALER_MINTDB_LockOperation *lock;
|
|
||||||
|
|
||||||
} details;
|
} details;
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -1124,38 +1091,6 @@ struct TALER_MINTDB_Plugin
|
|||||||
void *tdc_cls);
|
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
|
* Compile a list of all (historic) transactions performed
|
||||||
* with the given coin (/refresh/melt and /deposit operations).
|
* with the given coin (/refresh/melt and /deposit operations).
|
||||||
|
@ -67,15 +67,6 @@ calculate_transaction_list_totals (struct TALER_MINTDB_TransactionList *tl,
|
|||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
break;
|
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;
|
*ret = spent;
|
||||||
|
@ -465,14 +465,6 @@ compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl)
|
|||||||
&melt->coin_sig.eddsa_signature);
|
&melt->coin_sig.eddsa_signature);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TALER_MINTDB_TT_LOCK:
|
|
||||||
{
|
|
||||||
type = "lock";
|
|
||||||
value = pos->details.lock->amount;
|
|
||||||
transaction = NULL;
|
|
||||||
GNUNET_break (0); /* #3625: Lock NOT implemented! */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
GNUNET_assert (0);
|
GNUNET_assert (0);
|
||||||
}
|
}
|
||||||
|
@ -107,10 +107,6 @@ common_free_coin_transaction_list (void *cls,
|
|||||||
case TALER_MINTDB_TT_REFRESH_MELT:
|
case TALER_MINTDB_TT_REFRESH_MELT:
|
||||||
GNUNET_free (list->details.melt);
|
GNUNET_free (list->details.melt);
|
||||||
break;
|
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);
|
GNUNET_free (list);
|
||||||
list = next;
|
list = next;
|
||||||
|
@ -3286,8 +3286,6 @@ libtaler_plugin_mintdb_postgres_init (void *cls)
|
|||||||
plugin->get_link_data_list = &postgres_get_link_data_list;
|
plugin->get_link_data_list = &postgres_get_link_data_list;
|
||||||
plugin->free_link_data_list = &common_free_link_data_list;
|
plugin->free_link_data_list = &common_free_link_data_list;
|
||||||
plugin->get_transfer = &postgres_get_transfer;
|
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->get_coin_transactions = &postgres_get_coin_transactions;
|
||||||
plugin->free_coin_transaction_list = &common_free_coin_transaction_list;
|
plugin->free_coin_transaction_list = &common_free_coin_transaction_list;
|
||||||
return plugin;
|
return plugin;
|
||||||
|
Loading…
Reference in New Issue
Block a user