remarks on #3812
This commit is contained in:
parent
da27bee6e4
commit
9e981afa3f
@ -278,8 +278,8 @@ postgres_create_tables (void *cls,
|
|||||||
/* Index blindcoins(reserve_pub) for get_reserves_blindcoins statement */
|
/* Index blindcoins(reserve_pub) for get_reserves_blindcoins statement */
|
||||||
SQLEXEC_INDEX ("CREATE INDEX collectable_blindcoins_reserve_pub_index ON"
|
SQLEXEC_INDEX ("CREATE INDEX collectable_blindcoins_reserve_pub_index ON"
|
||||||
" 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 track
|
||||||
double-spending.
|
coin information only once.
|
||||||
TODO: maybe eliminate, this might be over-normalization (#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"
|
||||||
@ -300,6 +300,16 @@ postgres_create_tables (void *cls,
|
|||||||
",num_newcoins INT2 NOT NULL"
|
",num_newcoins INT2 NOT NULL"
|
||||||
",noreveal_index INT2 NOT NULL"
|
",noreveal_index INT2 NOT NULL"
|
||||||
")");
|
")");
|
||||||
|
/* Table with coins that have been melted. Gives the coin's public
|
||||||
|
key (coin_pub), the melting session, the index of this coin in that
|
||||||
|
session, the signature affirming the melting and the amount that
|
||||||
|
this coin contributed to the melting session.
|
||||||
|
TODO: is this amount with or without fees? Should probably
|
||||||
|
be total (with fee), but then we should make that explicit
|
||||||
|
in the name. Also should we not include
|
||||||
|
both amounts (or also the fee explicitly) in the table
|
||||||
|
to ease auditing of operations?
|
||||||
|
*/
|
||||||
SQLEXEC("CREATE TABLE IF NOT EXISTS refresh_melts "
|
SQLEXEC("CREATE TABLE IF NOT EXISTS refresh_melts "
|
||||||
"(coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub)"
|
"(coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub)"
|
||||||
",session BYTEA NOT NULL REFERENCES refresh_sessions (session_hash)"
|
",session BYTEA NOT NULL REFERENCES refresh_sessions (session_hash)"
|
||||||
|
Loading…
Reference in New Issue
Block a user