diff options
Diffstat (limited to 'src/exchangedb')
| -rw-r--r-- | src/exchangedb/perf_taler_exchangedb_init.c | 10 | ||||
| -rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 94 | ||||
| -rw-r--r-- | src/exchangedb/test_exchangedb.c | 47 | 
3 files changed, 76 insertions, 75 deletions
diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index 1694dc06..41dda56e 100644 --- a/src/exchangedb/perf_taler_exchangedb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -209,7 +209,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi    struct TALER_EXCHANGEDB_Deposit *deposit;    struct TALER_CoinSpendSignatureP csig;    struct TALER_MerchantPublicKeyP merchant_pub; -  struct GNUNET_HashCode h_contract; +  struct GNUNET_HashCode h_proposal_data;    struct GNUNET_HashCode h_wire;    const char wire[] = "{"      "\"type\":\"SEPA\"," @@ -226,7 +226,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi    GNUNET_assert (NULL !=                   (deposit = GNUNET_malloc (sizeof (struct TALER_EXCHANGEDB_Deposit) + sizeof (wire))));    GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, -                                    &h_contract); +                                    &h_proposal_data);    GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,                                      &h_wire);    { //csig @@ -234,10 +234,10 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi      {        struct GNUNET_CRYPTO_EccSignaturePurpose purpose;        struct GNUNET_HashCode h_wire; -      struct GNUNET_HashCode h_contract; +      struct GNUNET_HashCode h_proposal_data;      } unsigned_data; -    unsigned_data.h_contract = h_contract; +    unsigned_data.h_proposal_data = h_proposal_data;      unsigned_data.h_wire = h_wire;      unsigned_data.purpose.size = htonl (sizeof (struct u32_presign));      unsigned_data.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); @@ -274,7 +274,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coi      GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature);    }    deposit->csig = csig; -  deposit->h_contract = h_contract; +  deposit->h_proposal_data = h_proposal_data;    deposit->h_wire = h_wire;    deposit->receiver_wire_account = json_loads (wire, 0, NULL);    deposit->transaction_id = transaction_id++; diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index a41dc4e6..69a1cae3 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -435,7 +435,7 @@ postgres_create_tables (void *cls)            ",refund_deadline INT8 NOT NULL"            ",wire_deadline INT8 NOT NULL"            ",merchant_pub BYTEA NOT NULL CHECK (LENGTH(merchant_pub)=32)" -          ",h_contract BYTEA NOT NULL CHECK (LENGTH(h_contract)=64)" +          ",h_proposal_data BYTEA NOT NULL CHECK (LENGTH(h_proposal_data)=64)"            ",h_wire BYTEA NOT NULL CHECK (LENGTH(h_wire)=64)"            ",coin_sig BYTEA NOT NULL CHECK (LENGTH(coin_sig)=64)"            ",wire TEXT NOT NULL" @@ -454,7 +454,7 @@ postgres_create_tables (void *cls)  	  ",coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE CASCADE"            ",merchant_pub BYTEA NOT NULL CHECK(LENGTH(merchant_pub)=32)"            ",merchant_sig BYTEA NOT NULL CHECK(LENGTH(merchant_sig)=64)" -          ",h_contract BYTEA NOT NULL CHECK(LENGTH(h_contract)=64)" +          ",h_proposal_data BYTEA NOT NULL CHECK(LENGTH(h_proposal_data)=64)"            ",transaction_id INT8 NOT NULL"            ",rtransaction_id INT8 NOT NULL"            ",amount_with_fee_val INT8 NOT NULL" @@ -862,7 +862,7 @@ postgres_prepare (PGconn *db_conn)             "SELECT"             " merchant_pub"             ",merchant_sig" -           ",h_contract" +           ",h_proposal_data"             ",transaction_id"             ",rtransaction_id"             ",coin_pub" @@ -880,7 +880,7 @@ postgres_prepare (PGconn *db_conn)             "SELECT"             " merchant_pub"             ",merchant_sig" -           ",h_contract" +           ",h_proposal_data"             ",transaction_id"             ",rtransaction_id"             ",amount_with_fee_val" @@ -950,7 +950,7 @@ postgres_prepare (PGconn *db_conn)             ",refund_deadline"             ",wire_deadline"             ",merchant_pub" -           ",h_contract" +           ",h_proposal_data"             ",h_wire"             ",coin_sig"             ",wire" @@ -965,7 +965,7 @@ postgres_prepare (PGconn *db_conn)             "(coin_pub "             ",merchant_pub "             ",merchant_sig " -           ",h_contract " +           ",h_proposal_data "             ",transaction_id "             ",rtransaction_id "             ",amount_with_fee_val " @@ -985,7 +985,7 @@ postgres_prepare (PGconn *db_conn)             ",timestamp"             ",refund_deadline"             ",wire_deadline" -           ",h_contract" +           ",h_proposal_data"             ",h_wire"             " FROM deposits"             " WHERE (" @@ -1008,7 +1008,7 @@ postgres_prepare (PGconn *db_conn)  	   ",transaction_id"             ",refund_deadline"             ",wire_deadline" -           ",h_contract" +           ",h_proposal_data"             ",wire"             ",done"             ",deposit_serial_id" @@ -1037,7 +1037,7 @@ postgres_prepare (PGconn *db_conn)             "  (coin_pub=$1) AND"             "  (transaction_id=$2) AND"             "  (merchant_pub=$3) AND" -           "  (h_contract=$4) AND" +           "  (h_proposal_data=$4) AND"             "  (h_wire=$5)"             " )",             5, NULL); @@ -1054,7 +1054,7 @@ postgres_prepare (PGconn *db_conn)             ",denom.fee_deposit_curr"             ",wire_deadline"             ",transaction_id" -           ",h_contract" +           ",h_proposal_data"             ",wire"             ",merchant_pub"             ",coin_pub" @@ -1082,7 +1082,7 @@ postgres_prepare (PGconn *db_conn)             ",denom.fee_deposit_curr"             ",wire_deadline"             ",transaction_id" -           ",h_contract" +           ",h_proposal_data"             ",coin_pub"             " FROM deposits"             "    JOIN known_coins USING (coin_pub)" @@ -1116,7 +1116,7 @@ postgres_prepare (PGconn *db_conn)             " WHERE coin_pub=$1"             " AND transaction_id=$2"             " AND merchant_pub=$3" -           " AND h_contract=$4" +           " AND h_proposal_data=$4"             " AND h_wire=$5",             5, NULL); @@ -1134,7 +1134,7 @@ postgres_prepare (PGconn *db_conn)             ",timestamp"             ",refund_deadline"             ",merchant_pub" -           ",h_contract" +           ",h_proposal_data"             ",h_wire"             ",wire"             ",coin_sig" @@ -1204,7 +1204,7 @@ postgres_prepare (PGconn *db_conn)    /* Used in #postgres_lookup_wire_transfer */    PREPARE ("lookup_transactions",             "SELECT" -           " deposits.h_contract" +           " deposits.h_proposal_data"             ",deposits.h_wire"             ",deposits.coin_pub"             ",deposits.merchant_pub" @@ -1239,7 +1239,7 @@ postgres_prepare (PGconn *db_conn)             "    JOIN known_coins USING (coin_pub)"             "    JOIN denominations denom USING (denom_pub)"             " WHERE coin_pub=$1" -           "  AND h_contract=$2" +           "  AND h_proposal_data=$2"             "  AND h_wire=$3"             "  AND transaction_id=$4"             "  AND merchant_pub=$5", @@ -2264,8 +2264,8 @@ postgres_have_deposit (void *cls,                                            &deposit2.refund_deadline),        GNUNET_PQ_result_spec_absolute_time ("wire_deadline",                                            &deposit2.wire_deadline), -      GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                           &deposit2.h_contract), +      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                           &deposit2.h_proposal_data),        GNUNET_PQ_result_spec_auto_from_type ("h_wire",                                             &deposit2.h_wire),        GNUNET_PQ_result_spec_end @@ -2285,8 +2285,8 @@ postgres_have_deposit (void *cls,            deposit2.timestamp.abs_value_us) ||           (deposit->refund_deadline.abs_value_us !=            deposit2.refund_deadline.abs_value_us) || -         (0 != memcmp (&deposit->h_contract, -                       &deposit2.h_contract, +         (0 != memcmp (&deposit->h_proposal_data, +                       &deposit2.h_proposal_data,                         sizeof (struct GNUNET_HashCode))) ||           (0 != memcmp (&deposit->h_wire,                         &deposit2.h_wire, @@ -2360,7 +2360,7 @@ postgres_test_deposit_done (void *cls,      GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub),      GNUNET_PQ_query_param_uint64 (&deposit->transaction_id),      GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub), -    GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract), +    GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),      GNUNET_PQ_query_param_auto_from_type (&deposit->h_wire),      GNUNET_PQ_query_param_end    }; @@ -2494,7 +2494,7 @@ postgres_get_ready_deposit (void *cls,      struct TALER_Amount amount_with_fee;      struct TALER_Amount deposit_fee;      struct GNUNET_TIME_Absolute wire_deadline; -    struct GNUNET_HashCode h_contract; +    struct GNUNET_HashCode h_proposal_data;      struct TALER_MerchantPublicKeyP merchant_pub;      struct TALER_CoinSpendPublicKeyP coin_pub;      uint64_t transaction_id; @@ -2511,8 +2511,8 @@ postgres_get_ready_deposit (void *cls,                                     &deposit_fee),        GNUNET_PQ_result_spec_absolute_time ("wire_deadline",                                            &wire_deadline), -      GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                           &h_contract), +      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                           &h_proposal_data),        GNUNET_PQ_result_spec_auto_from_type ("merchant_pub",                                             &merchant_pub),        GNUNET_PQ_result_spec_auto_from_type ("coin_pub", @@ -2538,7 +2538,7 @@ postgres_get_ready_deposit (void *cls,                        &amount_with_fee,                        &deposit_fee,                        transaction_id, -                      &h_contract, +                      &h_proposal_data,                        wire_deadline,                        wire);      GNUNET_PQ_cleanup_result (rs); @@ -2602,7 +2602,7 @@ postgres_iterate_matching_deposits (void *cls,      struct TALER_Amount amount_with_fee;      struct TALER_Amount deposit_fee;      struct GNUNET_TIME_Absolute wire_deadline; -    struct GNUNET_HashCode h_contract; +    struct GNUNET_HashCode h_proposal_data;      struct TALER_CoinSpendPublicKeyP coin_pub;      uint64_t transaction_id;      uint64_t serial_id; @@ -2618,8 +2618,8 @@ postgres_iterate_matching_deposits (void *cls,                                     &deposit_fee),        GNUNET_PQ_result_spec_absolute_time ("wire_deadline",                                             &wire_deadline), -      GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                            &h_contract), +      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                            &h_proposal_data),        GNUNET_PQ_result_spec_auto_from_type ("coin_pub",                                              &coin_pub),        GNUNET_PQ_result_spec_end @@ -2640,7 +2640,7 @@ postgres_iterate_matching_deposits (void *cls,                        &amount_with_fee,                        &deposit_fee,                        transaction_id, -                      &h_contract, +                      &h_proposal_data,                        wire_deadline,                        NULL);      GNUNET_PQ_cleanup_result (rs); @@ -2780,7 +2780,7 @@ postgres_insert_deposit (void *cls,      GNUNET_PQ_query_param_absolute_time (&deposit->refund_deadline),      GNUNET_PQ_query_param_absolute_time (&deposit->wire_deadline),      GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub), -    GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract), +    GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),      GNUNET_PQ_query_param_auto_from_type (&deposit->h_wire),      GNUNET_PQ_query_param_auto_from_type (&deposit->csig),      TALER_PQ_query_param_json (deposit->receiver_wire_account), @@ -2845,7 +2845,7 @@ postgres_insert_refund (void *cls,      GNUNET_PQ_query_param_auto_from_type (&refund->coin.coin_pub),      GNUNET_PQ_query_param_auto_from_type (&refund->merchant_pub),      GNUNET_PQ_query_param_auto_from_type (&refund->merchant_sig), -    GNUNET_PQ_query_param_auto_from_type (&refund->h_contract), +    GNUNET_PQ_query_param_auto_from_type (&refund->h_proposal_data),      GNUNET_PQ_query_param_uint64 (&refund->transaction_id),      GNUNET_PQ_query_param_uint64 (&refund->rtransaction_id),      TALER_PQ_query_param_amount (&refund->refund_amount), @@ -3756,8 +3756,8 @@ postgres_get_coin_transactions (void *cls,                                                 &deposit->refund_deadline),            GNUNET_PQ_result_spec_auto_from_type ("merchant_pub",                                                  &deposit->merchant_pub), -          GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                                &deposit->h_contract), +          GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                                &deposit->h_proposal_data),            GNUNET_PQ_result_spec_auto_from_type ("h_wire",                                                  &deposit->h_wire),            TALER_PQ_result_spec_json ("wire", @@ -3902,8 +3902,8 @@ postgres_get_coin_transactions (void *cls,                                                  &refund->merchant_pub),            GNUNET_PQ_result_spec_auto_from_type ("merchant_sig",                                                  &refund->merchant_sig), -          GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                                &refund->h_contract), +          GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                                &refund->h_proposal_data),            GNUNET_PQ_result_spec_uint64 ("transaction_id",                                          &refund->transaction_id),            GNUNET_PQ_result_spec_uint64 ("rtransaction_id", @@ -4002,7 +4002,7 @@ postgres_lookup_wire_transfer (void *cls,    }    for (i=0;i<nrows;i++)    { -    struct GNUNET_HashCode h_contract; +    struct GNUNET_HashCode h_proposal_data;      struct GNUNET_HashCode h_wire;      struct TALER_CoinSpendPublicKeyP coin_pub;      struct TALER_MerchantPublicKeyP merchant_pub; @@ -4011,7 +4011,7 @@ postgres_lookup_wire_transfer (void *cls,      struct TALER_Amount amount_with_fee;      struct TALER_Amount deposit_fee;      struct GNUNET_PQ_ResultSpec rs[] = { -      GNUNET_PQ_result_spec_auto_from_type ("h_contract", &h_contract), +      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", &h_proposal_data),        GNUNET_PQ_result_spec_auto_from_type ("h_wire", &h_wire),        GNUNET_PQ_result_spec_auto_from_type ("coin_pub", &coin_pub),        GNUNET_PQ_result_spec_auto_from_type ("merchant_pub", &merchant_pub), @@ -4034,7 +4034,7 @@ postgres_lookup_wire_transfer (void *cls,          &merchant_pub,          &h_wire,          exec_time, -        &h_contract, +        &h_proposal_data,          transaction_id,          &coin_pub,          &amount_with_fee, @@ -4052,7 +4052,7 @@ postgres_lookup_wire_transfer (void *cls,   *   * @param cls closure   * @param session database connection - * @param h_contract hash of the contract + * @param h_proposal_data hash of the proposal data   * @param h_wire hash of merchant wire details   * @param coin_pub public key of deposited coin   * @param merchant_pub merchant public key @@ -4065,7 +4065,7 @@ postgres_lookup_wire_transfer (void *cls,  static int  postgres_wire_lookup_deposit_wtid (void *cls,                                     struct TALER_EXCHANGEDB_Session *session, -				   const struct GNUNET_HashCode *h_contract, +				   const struct GNUNET_HashCode *h_proposal_data,  				   const struct GNUNET_HashCode *h_wire,  				   const struct TALER_CoinSpendPublicKeyP *coin_pub,  				   const struct TALER_MerchantPublicKeyP *merchant_pub, @@ -4076,7 +4076,7 @@ postgres_wire_lookup_deposit_wtid (void *cls,    PGresult *result;    struct GNUNET_PQ_QueryParam params[] = {      GNUNET_PQ_query_param_auto_from_type (coin_pub), -    GNUNET_PQ_query_param_auto_from_type (h_contract), +    GNUNET_PQ_query_param_auto_from_type (h_proposal_data),      GNUNET_PQ_query_param_auto_from_type (h_wire),      GNUNET_PQ_query_param_uint64 (&transaction_id),      GNUNET_PQ_query_param_auto_from_type (merchant_pub), @@ -4109,7 +4109,7 @@ postgres_wire_lookup_deposit_wtid (void *cls,          GNUNET_PQ_query_param_auto_from_type (coin_pub),          GNUNET_PQ_query_param_uint64 (&transaction_id),          GNUNET_PQ_query_param_auto_from_type (merchant_pub), -        GNUNET_PQ_query_param_auto_from_type (h_contract), +        GNUNET_PQ_query_param_auto_from_type (h_proposal_data),          GNUNET_PQ_query_param_auto_from_type (h_wire),          GNUNET_PQ_query_param_end        }; @@ -4538,8 +4538,8 @@ postgres_select_deposits_above_serial_id (void *cls,                                             &deposit.refund_deadline),        GNUNET_PQ_result_spec_absolute_time ("wire_deadline",                                             &deposit.wire_deadline), -      GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                           &deposit.h_contract), +      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                           &deposit.h_proposal_data),        TALER_PQ_result_spec_json ("wire",                                   &deposit.receiver_wire_account),        GNUNET_PQ_result_spec_auto_from_type ("done", @@ -4564,7 +4564,7 @@ postgres_select_deposits_above_serial_id (void *cls,          &deposit.csig,          &deposit.amount_with_fee,          deposit.transaction_id, -        &deposit.h_contract, +        &deposit.h_proposal_data,          deposit.refund_deadline,          deposit.wire_deadline,          deposit.receiver_wire_account, @@ -4723,8 +4723,8 @@ postgres_select_refunds_above_serial_id (void *cls,                                              &refund.merchant_pub),        GNUNET_PQ_result_spec_auto_from_type ("merchant_sig",                                             &refund.merchant_sig), -      GNUNET_PQ_result_spec_auto_from_type ("h_contract", -                                           &refund.h_contract), +      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", +                                           &refund.h_proposal_data),        GNUNET_PQ_result_spec_uint64 ("transaction_id",                                      &refund.transaction_id),        GNUNET_PQ_result_spec_uint64 ("rtransaction_id", @@ -4751,7 +4751,7 @@ postgres_select_refunds_above_serial_id (void *cls,          &refund.coin.coin_pub,          &refund.merchant_pub,          &refund.merchant_sig, -        &refund.h_contract, +        &refund.h_proposal_data,          refund.transaction_id,          refund.rtransaction_id,          &refund.refund_amount); diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index bc46a8f8..3d82436a 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -513,7 +513,7 @@ check_transfer_data (void *cls,   * @param coin_sig signature from the coin   * @param amount_with_fee amount that was deposited including fee   * @param transaction_id unique transaction ID chosen by the merchant - * @param h_contract hash of the contract between merchant and customer + * @param h_proposal_data hash of the proposal data known to merchant and customer   * @param refund_deadline by which the merchant adviced that he might want   *        to get a refund   * @param wire_deadline by which the merchant adviced that he would like the @@ -786,7 +786,7 @@ cb_wt_never (void *cls,               const struct TALER_MerchantPublicKeyP *merchant_pub,               const struct GNUNET_HashCode *h_wire,               struct GNUNET_TIME_Absolute exec_time, -             const struct GNUNET_HashCode *h_contract, +             const struct GNUNET_HashCode *h_proposal_data,               uint64_t transaction_id,               const struct TALER_CoinSpendPublicKeyP *coin_pub,               const struct TALER_Amount *coin_value, @@ -812,7 +812,7 @@ cb_wtid_never (void *cls,  static struct TALER_MerchantPublicKeyP merchant_pub_wt;  static struct GNUNET_HashCode h_wire_wt; -static struct GNUNET_HashCode h_contract_wt; +static struct GNUNET_HashCode h_proposal_data_wt;  static uint64_t transaction_id_wt;  static struct TALER_CoinSpendPublicKeyP coin_pub_wt;  static struct TALER_Amount coin_value_wt; @@ -830,7 +830,7 @@ cb_wt_check (void *cls,               const struct TALER_MerchantPublicKeyP *merchant_pub,               const struct GNUNET_HashCode *h_wire,               struct GNUNET_TIME_Absolute exec_time, -             const struct GNUNET_HashCode *h_contract, +             const struct GNUNET_HashCode *h_proposal_data,               uint64_t transaction_id,               const struct TALER_CoinSpendPublicKeyP *coin_pub,               const struct TALER_Amount *coin_value, @@ -844,8 +844,8 @@ cb_wt_check (void *cls,                                &h_wire_wt,                                sizeof (struct GNUNET_HashCode)));    GNUNET_assert (exec_time.abs_value_us == execution_time_wt.abs_value_us); -  GNUNET_assert (0 == memcmp (h_contract, -                              &h_contract_wt, +  GNUNET_assert (0 == memcmp (h_proposal_data, +                              &h_proposal_data_wt,                                sizeof (struct GNUNET_HashCode)));    GNUNET_assert (transaction_id == transaction_id_wt);    GNUNET_assert (0 == memcmp (coin_pub, @@ -900,7 +900,7 @@ static uint64_t deposit_rowid;   * @param amount_with_fee amount that was deposited including fee   * @param deposit_fee amount the exchange gets to keep as transaction fees   * @param transaction_id unique transaction ID chosen by the merchant - * @param h_contract hash of the contract between merchant and customer + * @param h_proposal_data hash of the proposal data known to merchant and customer   * @param wire_deadline by which the merchant adviced that he would like the   *        wire transfer to be executed   * @param wire wire details for the merchant, NULL from iterate_matching_deposits() @@ -915,7 +915,7 @@ deposit_cb (void *cls,              const struct TALER_Amount *amount_with_fee,              const struct TALER_Amount *deposit_fee,              uint64_t transaction_id, -            const struct GNUNET_HashCode *h_contract, +            const struct GNUNET_HashCode *h_proposal_data,              struct GNUNET_TIME_Absolute wire_deadline,              const json_t *wire)  { @@ -932,8 +932,8 @@ deposit_cb (void *cls,                                 &deposit->amount_with_fee)) ||         (0 != TALER_amount_cmp (deposit_fee,                                 &deposit->deposit_fee)) || -       (0 != memcmp (h_contract, -                     &deposit->h_contract, +       (0 != memcmp (h_proposal_data, +                     &deposit->h_proposal_data,                       sizeof (struct GNUNET_HashCode))) ||         (0 != memcmp (coin_pub,                       &deposit->coin.coin_pub, @@ -961,7 +961,7 @@ deposit_cb (void *cls,   * @param coin_sig signature from the coin   * @param amount_with_fee amount that was deposited including fee   * @param transaction_id unique transaction ID chosen by the merchant - * @param h_contract hash of the contract between merchant and customer + * @param h_proposal_data hash of the proposal data known to merchant and customer   * @param refund_deadline by which the merchant adviced that he might want   *        to get a refund   * @param wire_deadline by which the merchant adviced that he would like the @@ -978,7 +978,7 @@ audit_deposit_cb (void *cls,                    const struct TALER_CoinSpendSignatureP *coin_sig,                    const struct TALER_Amount *amount_with_fee,                    uint64_t transaction_id, -                  const struct GNUNET_HashCode *h_contract, +                  const struct GNUNET_HashCode *h_proposal_data,                    struct GNUNET_TIME_Absolute refund_deadline,                    struct GNUNET_TIME_Absolute wire_deadline,                    const json_t *receiver_wire_account, @@ -998,7 +998,8 @@ audit_deposit_cb (void *cls,   * @param coin_pub public key of the coin   * @param merchant_pub public key of the merchant   * @param merchant_sig signature of the merchant - * @param h_contract hash of the contract between merchant and customer + * @param h_proposal_data hash of the proposal data in + *                        the contract between merchant and customer   * @param transaction_id original transaction ID chosen by the merchant   * @param rtransaction_id refund transaction ID chosen by the merchant   * @param amount_with_fee amount that was deposited including fee @@ -1010,7 +1011,7 @@ audit_refund_cb (void *cls,                   const struct TALER_CoinSpendPublicKeyP *coin_pub,                   const struct TALER_MerchantPublicKeyP *merchant_pub,                   const struct TALER_MerchantSignatureP *merchant_sig, -                 const struct GNUNET_HashCode *h_contract, +                 const struct GNUNET_HashCode *h_proposal_data,                   uint64_t transaction_id,                   uint64_t rtransaction_id,                   const struct TALER_Amount *amount_with_fee) @@ -1342,7 +1343,7 @@ run (void *cls)    deposit.coin.denom_sig = cbc.sig;    RND_BLK (&deposit.csig);    RND_BLK (&deposit.merchant_pub); -  RND_BLK (&deposit.h_contract); +  RND_BLK (&deposit.h_proposal_data);    wire = json_loads (json_wire_str, 0, NULL);    TALER_JSON_hash (wire,                     &deposit.h_wire); @@ -1445,7 +1446,7 @@ run (void *cls)    refund.coin = deposit.coin;    refund.merchant_pub = deposit.merchant_pub;    RND_BLK (&refund.merchant_sig); -  refund.h_contract = deposit.h_contract; +  refund.h_proposal_data = deposit.h_proposal_data;    refund.transaction_id = deposit.transaction_id;    refund.rtransaction_id = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);    refund.refund_amount = deposit.amount_with_fee; @@ -1488,8 +1489,8 @@ run (void *cls)          FAILIF (0 != memcmp (&have->merchant_pub,                               &deposit.merchant_pub,                               sizeof (struct TALER_MerchantPublicKeyP))); -        FAILIF (0 != memcmp (&have->h_contract, -                             &deposit.h_contract, +        FAILIF (0 != memcmp (&have->h_proposal_data, +                             &deposit.h_proposal_data,                               sizeof (struct GNUNET_HashCode)));          FAILIF (0 != memcmp (&have->h_wire,                               &deposit.h_wire, @@ -1531,8 +1532,8 @@ run (void *cls)          FAILIF (0 != memcmp (&have->merchant_sig,                               &refund.merchant_sig,                               sizeof (struct TALER_MerchantSignatureP))); -        FAILIF (0 != memcmp (&have->h_contract, -                             &refund.h_contract, +        FAILIF (0 != memcmp (&have->h_proposal_data, +                             &refund.h_proposal_data,                               sizeof (struct GNUNET_HashCode)));          FAILIF (have->transaction_id != refund.transaction_id);          FAILIF (have->rtransaction_id != refund.rtransaction_id); @@ -1559,7 +1560,7 @@ run (void *cls)    memset (&wtid, 42, sizeof (wtid));    merchant_pub_wt = deposit.merchant_pub;    h_wire_wt = deposit.h_wire; -  h_contract_wt = deposit.h_contract; +  h_proposal_data_wt = deposit.h_proposal_data;    coin_pub_wt = deposit.coin.coin_pub;    transaction_id_wt = deposit.transaction_id;    execution_time_wt = GNUNET_TIME_absolute_get (); @@ -1578,7 +1579,7 @@ run (void *cls)    FAILIF (GNUNET_NO !=            plugin->wire_lookup_deposit_wtid (plugin->cls,                                              session, -                                            &h_contract_wt, +                                            &h_proposal_data_wt,                                              &h_wire_wt,                                              &coin_pub_wt,                                              &merchant_pub_wt, @@ -1601,7 +1602,7 @@ run (void *cls)    FAILIF (GNUNET_OK !=            plugin->wire_lookup_deposit_wtid (plugin->cls,                                              session, -                                            &h_contract_wt, +                                            &h_proposal_data_wt,                                              &h_wire_wt,                                              &coin_pub_wt,                                              &merchant_pub_wt,  | 
