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