aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-12-23 23:33:22 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2023-12-23 23:33:22 +0100
commit234b0cd56f69305f27ac5f6cd3828c0d115dcd0f (patch)
tree10d8f0872098d308cbaf2f0b6abb69936a104fb8 /src/include
parent13bb37b6a811451accc14b3501173637f2c28d10 (diff)
Added appropriate response on contract-conflict during deposit
In case of a detected conflict during deposit, because (merchant_pub, h_contract_terms) already existed, with different other field values, we now provide the client an error response that contains the h_wire. This way, the client can retrieve further details about the conflicting transaction via /deposits/$H_WIRE/$MERCHANT_PUB/$H_CONTRACT_TERMS/$COIN_PUB Fixes #8002
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 25d3b17f9..7f7105a01 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -4400,6 +4400,25 @@ struct TALER_EXCHANGEDB_Plugin
/**
+ * Try to retrieve the solated hash of the merchant's bank account to a
+ * deposit contract. Used in case of conflicts for a given (merchant_pub,
+ * h_contract_terms) to provide the client the necessary input to retrieve
+ * more details about the conflict.
+ *
+ * @param cls the plugin closure
+ * @param merchant_pub public key of the merchant
+ * @param h_contract_terms contract to check for
+ * @param[out] h_wire hash of the wire details
+ */
+ enum GNUNET_DB_QueryStatus
+ (*get_wire_hash_for_contract)(
+ void *cls,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct TALER_PrivateContractHashP *h_contract_terms,
+ struct TALER_MerchantWireHashP *h_wire);
+
+
+ /**
* Check if we have the specified deposit already in the database.
*
* @param cls the `struct PostgresClosure` with the plugin-specific state