From 23445db811b4a4a281f0456f3a4e0411d2109d95 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Fri, 10 Apr 2015 14:47:23 +0200 Subject: mintdb postgres: hardlimit storing of currency code to 3 characters - #3768 --- src/mintdb/plugin_mintdb_postgres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index 19ae3a3bd..6fc3b4410 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -1409,7 +1409,7 @@ postgres_insert_deposit (void *cls, TALER_PQ_QUERY_PARAM_PTR (&amount_nbo.value), TALER_PQ_QUERY_PARAM_PTR (&amount_nbo.fraction), TALER_PQ_QUERY_PARAM_PTR_SIZED (amount_nbo.currency, - TALER_CURRENCY_LEN - 1), + 3), TALER_PQ_QUERY_PARAM_PTR (&deposit->merchant_pub), TALER_PQ_QUERY_PARAM_PTR (&deposit->h_contract), TALER_PQ_QUERY_PARAM_PTR (&deposit->h_wire), -- cgit v1.2.3 From 0e52c47de7904a9f41057d5a1dcdf183fe57d1df Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Fri, 10 Apr 2015 14:48:32 +0200 Subject: mintdb postgres: fix session hash length --- src/mintdb/plugin_mintdb_postgres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index 6fc3b4410..7e6b2d947 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -232,7 +232,7 @@ postgres_create_tables (void *cls, */ SQLEXEC("CREATE TABLE IF NOT EXISTS refresh_sessions " "(" - " session_hash BYTEA PRIMARY KEY CHECK (length(session_hash) = 32)" + " session_hash BYTEA PRIMARY KEY CHECK (length(session_hash) = 64)" ",num_oldcoins INT2 NOT NULL" ",num_newcoins INT2 NOT NULL" ",noreveal_index INT2 NOT NULL" -- cgit v1.2.3 From fcca3115427383f232b0510d162b0e5972a2ce2d Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Sun, 12 Apr 2015 11:07:41 +0200 Subject: mintdb: add fixme #3769: Should coins be made spendable at multiple merchants? --- src/mintdb/plugin_mintdb_postgres.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index 7e6b2d947..6197544ca 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -283,6 +283,7 @@ postgres_create_tables (void *cls, ")"); SQLEXEC("CREATE TABLE IF NOT EXISTS deposits " "( " + /* FIXME #3769: the following primary key may be too restrictive */ " coin_pub BYTEA NOT NULL PRIMARY KEY CHECK (length(coin_pub)=32)" ",denom_pub BYTEA NOT NULL" /* FIXME: Link this as a foreign key? */ ",denom_sig BYTEA NOT NULL" -- cgit v1.2.3