diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-30 19:28:11 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-30 19:28:11 +0200 |
commit | 963a06c0aa9bba4dec67e41c442548141e5f6186 (patch) | |
tree | 7f2587f0d69f46103ce93805a58b2242c61d5dee /src/include/taler_exchangedb_plugin.h | |
parent | 55ea7fcb9aa5000a857ebdd2ba9b881ddc460a93 (diff) | |
download | exchange-963a06c0aa9bba4dec67e41c442548141e5f6186.tar.xz |
fix more FTBFS issues
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 71 |
1 files changed, 41 insertions, 30 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 8b01ee650..73a18ca6a 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -981,18 +981,15 @@ struct TALER_EXCHANGEDB_Deposit struct TALER_PrivateContractHash h_contract_terms; /** - * Hash of the (canonical) representation of @e wire, used - * to check the signature on the request. Generated by - * the exchange from the detailed wire data provided by the - * merchant. + * Salt used by the merchant to compute "h_wire". */ - struct TALER_MerchantWireHash h_wire; + struct TALER_WireSalt wire_salt; /** - * Detailed information about the receiver for executing the transaction. - * Includes URL in payto://-format and salt. + * Information about the receiver for executing the transaction. URI in + * payto://-format. */ - json_t *receiver_wire_account; + char *receiver_wire_account; /** * Additional details for extensions relevant for this @@ -1072,23 +1069,20 @@ struct TALER_EXCHANGEDB_DepositListEntry struct TALER_PrivateContractHash h_contract_terms; /** - * Hash of the (canonical) representation of @e wire, used - * to check the signature on the request. Generated by - * the exchange from the detailed wire data provided by the - * merchant. - */ - struct TALER_MerchantWireHash h_wire; - - /** * Hash of the public denomination key used to sign the coin. */ struct TALER_DenominationHash h_denom_pub; /** * Detailed information about the receiver for executing the transaction. - * Includes URL in payto://-format and salt. + * URL in payto://-format. */ - json_t *receiver_wire_account; + char *receiver_wire_account; + + /** + * Salt used to compute h_wire from the @e receiver_wire_account. + */ + struct TALER_WireSalt wire_salt; /** * Time when this request was generated. Used, for example, to @@ -1545,17 +1539,9 @@ typedef enum GNUNET_GenericReturnValue void *cls, uint64_t rowid, struct GNUNET_TIME_Absolute exchange_timestamp, - struct GNUNET_TIME_Absolute wallet_timestamp, - const struct TALER_MerchantPublicKeyP *merchant_pub, + const struct TALER_EXCHANGEDB_Deposit *deposit, const struct TALER_DenominationPublicKey *denom_pub, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_CoinSpendSignatureP *coin_sig, - const struct TALER_Amount *amount_with_fee, - const struct TALER_PrivateContractHash *h_contract_terms, - struct GNUNET_TIME_Absolute refund_deadline, - struct GNUNET_TIME_Absolute wire_deadline, - const json_t *receiver_wire_account, - int done); + bool done); /** @@ -2627,7 +2613,6 @@ struct TALER_EXCHANGEDB_Plugin * * @param cls the @e cls of this struct with the plugin-specific state * @param deposit deposit to search for - * @param check_extras whether to check extra fields or not * @param[out] deposit_fee set to the deposit fee the exchange charged * @param[out] exchange_timestamp set to the time when the exchange received the deposit * @return 1 if we know this operation, @@ -2637,12 +2622,38 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*have_deposit)(void *cls, const struct TALER_EXCHANGEDB_Deposit *deposit, - int check_extras, struct TALER_Amount *deposit_fee, struct GNUNET_TIME_Absolute *exchange_timestamp); /** + * Check if we have the specified deposit already in the database. + * + * @param cls the `struct PostgresClosure` with the plugin-specific state + * @param h_contract_terms contract to check for + * @param h_wire wire hash to check for + * @param coin_pub public key of the coin to check for + * @param merchant merchant public key to check for + * @param refund_deadline expected refund deadline + * @param[out] deposit_fee set to the deposit fee the exchange charged + * @param[out] exchange_timestamp set to the time when the exchange received the deposit + * @return 1 if we know this operation, + * 0 if this exact deposit is unknown to us, + * otherwise transaction error status + */ + enum GNUNET_DB_QueryStatus + (*have_deposit2)( + void *cls, + const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_MerchantWireHash *h_wire, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_MerchantPublicKeyP *merchant, + struct GNUNET_TIME_Absolute refund_deadline, + struct TALER_Amount *deposit_fee, + struct GNUNET_TIME_Absolute *exchange_timestamp); + + + /** * Insert information about deposited coin into the database. * * @param cls the @e cls of this struct with the plugin-specific state |