exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 9e981afa3fccf52bc07be70197a4772ecceef606
parent da27bee6e48f2bb0be54b8cb0d3bbfcc5445fe7c
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  3 Jun 2015 13:53:38 +0200

remarks on #3812

Diffstat:
Msrc/mintdb/plugin_mintdb_postgres.c | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c @@ -278,8 +278,8 @@ postgres_create_tables (void *cls, /* Index blindcoins(reserve_pub) for get_reserves_blindcoins statement */ SQLEXEC_INDEX ("CREATE INDEX collectable_blindcoins_reserve_pub_index ON" " collectable_blindcoins (reserve_pub)"); - /* Table with coins that have been (partially) spent, used to detect - double-spending. + /* Table with coins that have been (partially) spent, used to track + coin information only once. TODO: maybe eliminate, this might be over-normalization (#3811) */ SQLEXEC("CREATE TABLE IF NOT EXISTS known_coins " "(coin_pub BYTEA NOT NULL PRIMARY KEY" @@ -300,6 +300,16 @@ postgres_create_tables (void *cls, ",num_newcoins 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 " "(coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub)" ",session BYTEA NOT NULL REFERENCES refresh_sessions (session_hash)"