summaryrefslogtreecommitdiff
path: root/src/mintdb
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2015-12-22 11:26:10 +0100
committerFlorian Dold <florian.dold@gmail.com>2015-12-22 11:26:10 +0100
commit24bfedf04e2603b263e5c28ef94b45b2643e2ab2 (patch)
treefe34fb68e41519931815c6364103135b04342bb8 /src/mintdb
parentfdf51f8c73fadca9301f53fede630a43cc33091a (diff)
parent204f732c1a408490d6d13fa36b0635ce72fd4575 (diff)
downloadexchange-24bfedf04e2603b263e5c28ef94b45b2643e2ab2.tar.gz
exchange-24bfedf04e2603b263e5c28ef94b45b2643e2ab2.tar.bz2
exchange-24bfedf04e2603b263e5c28ef94b45b2643e2ab2.zip
Merge branch 'master' of ssh://taler.net/var/git/mint
Diffstat (limited to 'src/mintdb')
-rw-r--r--src/mintdb/perf_taler_mintdb_interpreter.c2
-rw-r--r--src/mintdb/plugin_mintdb_postgres.c32
2 files changed, 32 insertions, 2 deletions
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.c b/src/mintdb/perf_taler_mintdb_interpreter.c
index 31f5d6508..9084513fb 100644
--- a/src/mintdb/perf_taler_mintdb_interpreter.c
+++ b/src/mintdb/perf_taler_mintdb_interpreter.c
@@ -1735,7 +1735,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
1,
1,
refresh_commit);
-
+ GNUNET_assert (GNUNET_OK == ret);
}
break;
diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c
index 6ed52e5e4..0f32cfb8e 100644
--- a/src/mintdb/plugin_mintdb_postgres.c
+++ b/src/mintdb/plugin_mintdb_postgres.c
@@ -3355,7 +3355,6 @@ postgres_get_coin_transactions (void *cls,
}
PQclear (result);
}
- /* FIXME: Handle locked coins (#3625) */
return head;
cleanup:
if (NULL != head)
@@ -3366,6 +3365,36 @@ postgres_get_coin_transactions (void *cls,
/**
+ * Try to find the wire transfer details for a deposit operation.
+ * If we did not execute the deposit yet, return when it is supposed
+ * to be executed.
+ *
+ * @param cls closure
+ * @param h_contract hash of the contract
+ * @param h_wire hash of merchant wire details
+ * @param coin_pub public key of deposited coin
+ * @param merchant_pub merchant public key
+ * @param transaction_id transaction identifier
+ * @param cb function to call with the result
+ * @param cb_cls closure to pass to @a cb
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors
+ */
+static int
+postgres_wire_lookup_deposit_wtid (void *cls,
+ const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ uint64_t transaction_id,
+ TALER_MINTDB_DepositWtidCallback cb,
+ void *cb_cls)
+{
+ GNUNET_break (0); // not implemented
+ return GNUNET_SYSERR;
+}
+
+
+/**
* Initialize Postgres database subsystem.
*
* @param cls a configuration instance
@@ -3436,6 +3465,7 @@ libtaler_plugin_mintdb_postgres_init (void *cls)
plugin->get_transfer = &postgres_get_transfer;
plugin->get_coin_transactions = &postgres_get_coin_transactions;
plugin->free_coin_transaction_list = &common_free_coin_transaction_list;
+ plugin->wire_lookup_deposit_wtid = &postgres_wire_lookup_deposit_wtid;
return plugin;
}