aboutsummaryrefslogtreecommitdiff
path: root/src/mint/mint_db.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <sreeharsha@totakura.in>2015-03-05 18:16:32 +0100
committerSree Harsha Totakura <sreeharsha@totakura.in>2015-03-06 10:32:53 +0100
commit0c4579085a1b9f09b9e41efe69bf2deadfa22cd7 (patch)
tree348d11fee4063de38a4c65d2d0d676cb7d1b5768 /src/mint/mint_db.h
parent7aab16da3430a388b2437c3299e835f9b8a5f9fc (diff)
downloadexchange-0c4579085a1b9f09b9e41efe69bf2deadfa22cd7.tar.xz
db: Implement reserves_in_insert()
Diffstat (limited to 'src/mint/mint_db.h')
-rw-r--r--src/mint/mint_db.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mint/mint_db.h b/src/mint/mint_db.h
index b26c70b26..74f0c2d14 100644
--- a/src/mint/mint_db.h
+++ b/src/mint/mint_db.h
@@ -204,6 +204,23 @@ TALER_MINT_DB_reserve_get (PGconn *db,
struct Reserve *reserve);
+/**
+ * Insert a incoming transaction into reserves. New reserves are also created
+ * through this function.
+ *
+ * @param db the database connection handle
+ * @param reserve the reserve structure. The public key of the reserve should
+ * be set here. Upon successful execution of this function, the
+ * balance and expiration of the reserve will be updated.
+ * @param balance the amount that has to be added to the reserve
+ * @param expiry the new expiration time for the reserve
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failures
+ */
+int
+TALER_MINT_DB_reserves_in_insert (PGconn *db,
+ struct Reserve *reserve,
+ const struct TALER_Amount balance,
+ const struct GNUNET_TIME_Absolute expiry);
/* FIXME: need call to convert CollectableBlindcoin to JSON (#3527) */