diff options
author | Sree Harsha Totakura <sreeharsha@totakura.in> | 2015-03-05 18:16:32 +0100 |
---|---|---|
committer | Sree Harsha Totakura <sreeharsha@totakura.in> | 2015-03-06 10:32:53 +0100 |
commit | 0c4579085a1b9f09b9e41efe69bf2deadfa22cd7 (patch) | |
tree | 348d11fee4063de38a4c65d2d0d676cb7d1b5768 /src/mint/mint_db.h | |
parent | 7aab16da3430a388b2437c3299e835f9b8a5f9fc (diff) |
db: Implement reserves_in_insert()
Diffstat (limited to 'src/mint/mint_db.h')
-rw-r--r-- | src/mint/mint_db.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mint/mint_db.h b/src/mint/mint_db.h index b26c70b2..74f0c2d1 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) */ |