This commit is contained in:
Christian Grothoff 2015-06-03 12:35:30 +02:00
parent 510c45efd6
commit f8558c418e
2 changed files with 7 additions and 4 deletions

View File

@ -862,6 +862,7 @@ struct TALER_MINTDB_Plugin
* @return #GNUNET_SYSERR upon error; #GNUNET_NO if no coin is found; #GNUNET_OK * @return #GNUNET_SYSERR upon error; #GNUNET_NO if no coin is found; #GNUNET_OK
* if upon succesfullying retrieving the record data info @a * if upon succesfullying retrieving the record data info @a
* ret_coin_info * ret_coin_info
* @deprecated (#3811)
*/ */
int int
(*get_known_coin) (void *cls, (*get_known_coin) (void *cls,
@ -878,6 +879,7 @@ struct TALER_MINTDB_Plugin
* @param session the shared database session * @param session the shared database session
* @param coin_info the public coin info * @param coin_info the public coin info
* @return #GNUNET_SYSERR upon error; #GNUNET_OK upon success * @return #GNUNET_SYSERR upon error; #GNUNET_OK upon success
* @deprecated (#3811)
*/ */
int int
(*insert_known_coin) (void *cls, (*insert_known_coin) (void *cls,

View File

@ -280,7 +280,7 @@ postgres_create_tables (void *cls,
" collectable_blindcoins (reserve_pub)"); " collectable_blindcoins (reserve_pub)");
/* Table with coins that have been (partially) spent, used to detect /* Table with coins that have been (partially) spent, used to detect
double-spending. double-spending.
TODO: maybe rename to "spent_coins"? (#3811) */ TODO: maybe eliminate, this might be over-normalization (#3811) */
SQLEXEC("CREATE TABLE IF NOT EXISTS known_coins " SQLEXEC("CREATE TABLE IF NOT EXISTS known_coins "
"(coin_pub BYTEA NOT NULL PRIMARY KEY" "(coin_pub BYTEA NOT NULL PRIMARY KEY"
",denom_pub BYTEA NOT NULL REFERENCES denominations (pub)" ",denom_pub BYTEA NOT NULL REFERENCES denominations (pub)"
@ -523,9 +523,10 @@ postgres_prepare (PGconn *db_conn)
4, NULL); 4, NULL);
PREPARE ("get_known_coin", PREPARE ("get_known_coin",
"SELECT" "SELECT"
" denom_pub, denom_sig " " denom_pub"
"FROM known_coins " ",denom_sig"
"WHERE coin_pub = $1", " FROM known_coins "
" WHERE coin_pub=$1",
1, NULL); 1, NULL);
PREPARE ("insert_known_coin", PREPARE ("insert_known_coin",
"INSERT INTO known_coins (" "INSERT INTO known_coins ("