export get-known-coin function from DB API
This commit is contained in:
parent
e042792944
commit
c9480d2287
@ -3299,7 +3299,7 @@ postgres_iterate_matching_deposits (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
get_known_coin (void *cls,
|
postgres_get_known_coin (void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
struct TALER_CoinPublicInfo *coin_info)
|
struct TALER_CoinPublicInfo *coin_info)
|
||||||
@ -3411,7 +3411,7 @@ postgres_ensure_coin_known (void *cls,
|
|||||||
struct TALER_CoinPublicInfo known_coin;
|
struct TALER_CoinPublicInfo known_coin;
|
||||||
|
|
||||||
/* check if the coin is already known */
|
/* check if the coin is already known */
|
||||||
qs = get_known_coin (pc,
|
qs = postgres_get_known_coin (pc,
|
||||||
session,
|
session,
|
||||||
&coin->coin_pub,
|
&coin->coin_pub,
|
||||||
&known_coin);
|
&known_coin);
|
||||||
@ -4303,7 +4303,7 @@ add_coin_deposit (void *cls,
|
|||||||
tl->next = chc->head;
|
tl->next = chc->head;
|
||||||
tl->type = TALER_EXCHANGEDB_TT_DEPOSIT;
|
tl->type = TALER_EXCHANGEDB_TT_DEPOSIT;
|
||||||
tl->details.deposit = deposit;
|
tl->details.deposit = deposit;
|
||||||
qs = get_known_coin (chc->db_cls,
|
qs = postgres_get_known_coin (chc->db_cls,
|
||||||
chc->session,
|
chc->session,
|
||||||
chc->coin_pub,
|
chc->coin_pub,
|
||||||
&deposit->coin);
|
&deposit->coin);
|
||||||
@ -4372,7 +4372,7 @@ add_coin_melt (void *cls,
|
|||||||
tl->type = TALER_EXCHANGEDB_TT_REFRESH_MELT;
|
tl->type = TALER_EXCHANGEDB_TT_REFRESH_MELT;
|
||||||
tl->details.melt = melt;
|
tl->details.melt = melt;
|
||||||
/* FIXME: integrate via JOIN in main select, instead of using separate query */
|
/* FIXME: integrate via JOIN in main select, instead of using separate query */
|
||||||
qs = get_known_coin (chc->db_cls,
|
qs = postgres_get_known_coin (chc->db_cls,
|
||||||
chc->session,
|
chc->session,
|
||||||
chc->coin_pub,
|
chc->coin_pub,
|
||||||
&melt->session.coin);
|
&melt->session.coin);
|
||||||
@ -4443,7 +4443,7 @@ add_coin_refund (void *cls,
|
|||||||
tl->next = chc->head;
|
tl->next = chc->head;
|
||||||
tl->type = TALER_EXCHANGEDB_TT_REFUND;
|
tl->type = TALER_EXCHANGEDB_TT_REFUND;
|
||||||
tl->details.refund = refund;
|
tl->details.refund = refund;
|
||||||
qs = get_known_coin (chc->db_cls,
|
qs = postgres_get_known_coin (chc->db_cls,
|
||||||
chc->session,
|
chc->session,
|
||||||
chc->coin_pub,
|
chc->coin_pub,
|
||||||
&refund->coin);
|
&refund->coin);
|
||||||
@ -7273,6 +7273,7 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
|
|||||||
plugin->free_reserve_history = &common_free_reserve_history;
|
plugin->free_reserve_history = &common_free_reserve_history;
|
||||||
plugin->count_known_coins = &postgres_count_known_coins;
|
plugin->count_known_coins = &postgres_count_known_coins;
|
||||||
plugin->ensure_coin_known = &postgres_ensure_coin_known;
|
plugin->ensure_coin_known = &postgres_ensure_coin_known;
|
||||||
|
plugin->get_known_coin = &postgres_get_known_coin;
|
||||||
plugin->have_deposit = &postgres_have_deposit;
|
plugin->have_deposit = &postgres_have_deposit;
|
||||||
plugin->mark_deposit_tiny = &postgres_mark_deposit_tiny;
|
plugin->mark_deposit_tiny = &postgres_mark_deposit_tiny;
|
||||||
plugin->test_deposit_done = &postgres_test_deposit_done;
|
plugin->test_deposit_done = &postgres_test_deposit_done;
|
||||||
|
Loading…
Reference in New Issue
Block a user