-added missing files to last commit
This commit is contained in:
parent
054e157af8
commit
15e8697ece
@ -1041,6 +1041,7 @@ handle_post_auditors (struct TEH_RequestContext *rc,
|
||||
root);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle incoming HTTP request.
|
||||
*
|
||||
|
@ -272,8 +272,10 @@ batch_deposit_transaction (void *cls,
|
||||
qs = TEH_plugin->persist_policy_details (TEH_plugin->cls,
|
||||
&dc->policy_details,
|
||||
&dc->policy_details_serial_id,
|
||||
&dc->policy_details.accumulated_total,
|
||||
&dc->policy_details.fulfillment_state);
|
||||
&dc->policy_details.
|
||||
accumulated_total,
|
||||
&dc->policy_details.
|
||||
fulfillment_state);
|
||||
if (qs < 0)
|
||||
return qs;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ TEH_extensions_post_handler (
|
||||
.proof = root,
|
||||
.timestamp = GNUNET_TIME_timestamp_get (),
|
||||
.details = policy_details,
|
||||
.details_count = policy_details_count
|
||||
.details_count = policy_details_count
|
||||
};
|
||||
|
||||
if (GNUNET_OK !=
|
||||
|
@ -1500,7 +1500,7 @@ run (void *cls)
|
||||
&deposit,
|
||||
known_coin_id,
|
||||
&h_payto,
|
||||
NULL, /* no policy_details_serial_id */
|
||||
NULL, /* no policy_details_serial_id */
|
||||
&deposit_timestamp,
|
||||
&balance_ok,
|
||||
&in_conflict));
|
||||
|
@ -61,57 +61,57 @@ TALER_policy_fulfillment_state_str (enum TALER_PolicyFulfillmentState state);
|
||||
/* @brief Details of a policy for a deposit request */
|
||||
struct TALER_PolicyDetails
|
||||
{
|
||||
/* Hash code that should be used for the .policy_hash_code field when
|
||||
* this policy is saved in the policy_details table. */
|
||||
struct GNUNET_HashCode hash_code;
|
||||
/* Hash code that should be used for the .policy_hash_code field when
|
||||
* this policy is saved in the policy_details table. */
|
||||
struct GNUNET_HashCode hash_code;
|
||||
|
||||
/* Content of the policy in its original JSON form */
|
||||
const json_t *policy_json;
|
||||
/* Content of the policy in its original JSON form */
|
||||
const json_t *policy_json;
|
||||
|
||||
/* When the deadline is meat and the policy is still in "Ready" state,
|
||||
* a timeout-handler will transfer the amount
|
||||
* (total_amount - policy_fee - refreshable_amount)
|
||||
* to the payto-URI from the corresponding deposit. The value
|
||||
* amount_refreshable will be refreshable by the owner of the
|
||||
* associated deposits's coins */
|
||||
struct GNUNET_TIME_Timestamp deadline;
|
||||
/* When the deadline is meat and the policy is still in "Ready" state,
|
||||
* a timeout-handler will transfer the amount
|
||||
* (total_amount - policy_fee - refreshable_amount)
|
||||
* to the payto-URI from the corresponding deposit. The value
|
||||
* amount_refreshable will be refreshable by the owner of the
|
||||
* associated deposits's coins */
|
||||
struct GNUNET_TIME_Timestamp deadline;
|
||||
|
||||
/* The amount to which this policy commits to. It must be at least as
|
||||
* large as @e policy_fee. */
|
||||
struct TALER_Amount commitment;
|
||||
/* The amount to which this policy commits to. It must be at least as
|
||||
* large as @e policy_fee. */
|
||||
struct TALER_Amount commitment;
|
||||
|
||||
/* The total sum of contributions from coins so far to fund this
|
||||
* policy. It must be at least as large as @commitment in order to be
|
||||
* sufficiently funded. */
|
||||
struct TALER_Amount accumulated_total;
|
||||
/* The total sum of contributions from coins so far to fund this
|
||||
* policy. It must be at least as large as @commitment in order to be
|
||||
* sufficiently funded. */
|
||||
struct TALER_Amount accumulated_total;
|
||||
|
||||
/* The fee from the exchange for handling the policy. It is due when
|
||||
* the state changes to Timeout or Success. */
|
||||
struct TALER_Amount policy_fee;
|
||||
/* The fee from the exchange for handling the policy. It is due when
|
||||
* the state changes to Timeout or Success. */
|
||||
struct TALER_Amount policy_fee;
|
||||
|
||||
/* The amount that will be transfered to the payto-URIs from the
|
||||
* corresponding deposits when the fulfillment state changes to Timeout
|
||||
* or Success. Note that a fulfillment handler can alter this upon
|
||||
* arrival of a proof of fulfillment. The remaining amount
|
||||
* (accumulated_amount - policy_amount - transferable_amount) */
|
||||
struct TALER_Amount transferable_amount;
|
||||
/* The amount that will be transfered to the payto-URIs from the
|
||||
* corresponding deposits when the fulfillment state changes to Timeout
|
||||
* or Success. Note that a fulfillment handler can alter this upon
|
||||
* arrival of a proof of fulfillment. The remaining amount
|
||||
* (accumulated_amount - policy_amount - transferable_amount) */
|
||||
struct TALER_Amount transferable_amount;
|
||||
|
||||
/* The state of fulfillment of a policy.
|
||||
* - If the state is Insufficient, the client is required to call
|
||||
* /deposit -maybe multiple times- with enough coins and the same
|
||||
* policy details in order to reach the required amount. The state is
|
||||
* then changed to Ready.
|
||||
* - If the state changes to Timeout or Success, a handler will transfer
|
||||
* the amount (total_amount - policy_fee - refreshable_amount) to the
|
||||
* payto-URI from the corresponding deposit. The value
|
||||
* amount_refreshable will be refreshable by the owner of the
|
||||
* associated deposits's coins. */
|
||||
enum TALER_PolicyFulfillmentState fulfillment_state;
|
||||
/* The state of fulfillment of a policy.
|
||||
* - If the state is Insufficient, the client is required to call
|
||||
* /deposit -maybe multiple times- with enough coins and the same
|
||||
* policy details in order to reach the required amount. The state is
|
||||
* then changed to Ready.
|
||||
* - If the state changes to Timeout or Success, a handler will transfer
|
||||
* the amount (total_amount - policy_fee - refreshable_amount) to the
|
||||
* payto-URI from the corresponding deposit. The value
|
||||
* amount_refreshable will be refreshable by the owner of the
|
||||
* associated deposits's coins. */
|
||||
enum TALER_PolicyFulfillmentState fulfillment_state;
|
||||
|
||||
/* If there is a proof of fulfillment, the row ID from the
|
||||
* policy_fulfillment table */
|
||||
uint64_t policy_fulfillment_id;
|
||||
bool no_policy_fulfillment_id;
|
||||
/* If there is a proof of fulfillment, the row ID from the
|
||||
* policy_fulfillment table */
|
||||
uint64_t policy_fulfillment_id;
|
||||
bool no_policy_fulfillment_id;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -120,27 +120,26 @@ struct TALER_PolicyDetails
|
||||
*/
|
||||
struct TALER_PolicyFulfillmentTransactionData
|
||||
{
|
||||
/* The incoming proof, provided by a client */
|
||||
const json_t *proof;
|
||||
/* The incoming proof, provided by a client */
|
||||
const json_t *proof;
|
||||
|
||||
/* The Hash of the proof */
|
||||
struct GNUNET_HashCode h_proof;
|
||||
/* The Hash of the proof */
|
||||
struct GNUNET_HashCode h_proof;
|
||||
|
||||
/* The timestamp of retrieval of the proof */
|
||||
struct GNUNET_TIME_Timestamp timestamp;
|
||||
/* The timestamp of retrieval of the proof */
|
||||
struct GNUNET_TIME_Timestamp timestamp;
|
||||
|
||||
/* The ID of the proof in the policy_fulfillment table. Will be set
|
||||
* during the transaction. Needed to fill the table
|
||||
* policy_details_fulfillments. */
|
||||
uint64_t fulfillment_id;
|
||||
/* The ID of the proof in the policy_fulfillment table. Will be set
|
||||
* during the transaction. Needed to fill the table
|
||||
* policy_details_fulfillments. */
|
||||
uint64_t fulfillment_id;
|
||||
|
||||
/* The list of policy details. Will be updated by the policy handler */
|
||||
struct TALER_PolicyDetails *details;
|
||||
size_t details_count;
|
||||
/* The list of policy details. Will be updated by the policy handler */
|
||||
struct TALER_PolicyDetails *details;
|
||||
size_t details_count;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @brief Extracts policy details from the deposit's policy options and the policy extensions
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user