From 63b19fad0cbcafa340d3344c9dc33c06402371a6 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Fri, 14 Oct 2022 20:10:06 +0200 Subject: simplify datastructures --- src/include/taler_exchangedb_plugin.h | 53 +++++++++++++++-------------------- 1 file changed, 23 insertions(+), 30 deletions(-) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 881e0cef..6d8b8ec2 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1447,30 +1447,6 @@ struct TALER_EXCHANGEDB_Deposit */ char *receiver_wire_account; - /** - * Additional policy and its options, relevant for this deposit operation, - * possibly NULL! - */ - json_t *policy_json; - - /* - * True if @e policy_json was provided - */ - bool has_policy; - - /** - * Hash over the @e policy_options. Only filled if @e has_policy is true. - * Needed for the verification of the deposit's signature - */ - struct TALER_ExtensionPolicyHashP h_policy; - - /** - * If @e policy_json was present, the corresponding policy extension - * calculates these details. These will be persisted in the policy_details - * table. - */ - struct TALER_PolicyDetails policy_details; - /** * Time when this request was generated. Used, for example, to * assess when (roughly) the income was achieved for tax purposes. @@ -1512,6 +1488,17 @@ struct TALER_EXCHANGEDB_Deposit */ struct TALER_Amount deposit_fee; + /* + * True if @e policy_json was provided + */ + bool has_policy; + + /** + * Hash over the policy data for this deposit (remains unknown to the + * Exchange). Needed for the verification of the deposit's signature + */ + struct TALER_ExtensionPolicyHashP h_policy; + }; @@ -1542,12 +1529,6 @@ struct TALER_EXCHANGEDB_DepositListEntry */ struct TALER_PrivateContractHashP h_contract_terms; - /** - * Hash over the policy data for this deposit (remains unknown to the - * Exchange). Needed for the verification of the deposit's signature - */ - struct TALER_ExtensionPolicyHashP h_policy; - /** * Hash of the public denomination key used to sign the coin. */ @@ -1616,6 +1597,18 @@ struct TALER_EXCHANGEDB_DepositListEntry */ struct TALER_Amount deposit_fee; + /* + * True if a policy was provided with the deposit request + */ + bool has_policy; + + /** + * Hash over the policy data for this deposit (remains unknown to the + * Exchange). Needed for the verification of the deposit's signature + */ + struct TALER_ExtensionPolicyHashP h_policy; + + /** * Has the deposit been wired? */ -- cgit v1.2.3