some DB logic fixes, so now more of tests pass

This commit is contained in:
Christian Grothoff 2015-08-17 23:38:00 +02:00
parent 1a0eb0307a
commit 51e0612f8b
4 changed files with 6 additions and 18 deletions

View File

@ -1998,8 +1998,6 @@ run (void *cls,
.details.deposit.contract = "{ \"items\"={ \"name\":\"ice cream\", \"value\":3 } }",
.details.deposit.transaction_id = 2 },
#if TEST_REFRESH
/* Test running a failing melt operation (same operation again must fail) */
{ .oc = OC_REFRESH_MELT,
.label = "refresh-melt-failing",
@ -2011,7 +2009,6 @@ run (void *cls,
// (signature differs from coin that was deposited...)
/* *************** end of /refresh testing ************** */
#endif
{ .oc = OC_END }
};
@ -2030,7 +2027,7 @@ run (void *cls,
GNUNET_assert (NULL != mint);
shutdown_task
= GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 30),
(GNUNET_TIME_UNIT_SECONDS, 150),
&do_shutdown, is);
}
@ -2075,7 +2072,7 @@ main (int argc,
fprintf (stderr, ".");
sleep (1);
}
while (0 != system ("wget -q -t 1 http://localhost:8081/agpl -o /dev/null -O /dev/null"));
while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/agpl -o /dev/null -O /dev/null"));
fprintf (stderr, "\n");
result = GNUNET_SYSERR;
GNUNET_SCHEDULER_run (&run, NULL);

View File

@ -250,15 +250,12 @@ verify_coin_public_info (struct MHD_Connection *connection,
return TMH_RESPONSE_reply_arg_unknown (connection,
"denom_pub");
}
/* FIXME: need to check if denomination key is still
valid for issuing! (#3634) */
TALER_amount_ntoh (&fee_refresh,
&dki->issue.properties.fee_refresh);
melt_detail->melt_fee = fee_refresh;
body.purpose.size = htonl (sizeof (struct TALER_RefreshMeltCoinAffirmationPS));
body.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_MELT);
body.session_hash = *session_hash;
TALER_amount_hton (&body.amount_with_fee,
&melt_detail->melt_amount_with_fee);
TALER_amount_hton (&body.melt_fee,

View File

@ -419,7 +419,7 @@ compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl)
/* internal sanity check before we hand out a bogus sig... */
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (ntohl (dr.purpose.purpose),
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_WALLET_COIN_DEPOSIT,
&dr.purpose,
&deposit->csig.eddsa_signature,
&deposit->coin.coin_pub.eddsa_pub))
@ -451,7 +451,7 @@ compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl)
/* internal sanity check before we hand out a bogus sig... */
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (ntohl (ms.purpose.purpose),
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_WALLET_COIN_MELT,
&ms.purpose,
&melt->coin_sig.eddsa_signature,
&melt->coin.coin_pub.eddsa_pub))

View File

@ -2181,9 +2181,6 @@ postgres_insert_refresh_melt (void *cls,
}
if (GNUNET_NO == ret) /* if not, insert it */
{
fprintf (stderr,
"Melting coin coin %s\n",
TALER_B2S (&melt->coin.coin_pub));
ret = insert_known_coin (cls,
session,
&melt->coin);
@ -3026,10 +3023,6 @@ postgres_get_transfer (void *cls,
return GNUNET_SYSERR;
}
nrows = PQntuples (result);
fprintf (stderr,
"linkage for coin %s resulted in %d results\n",
TALER_B2S (coin_pub),
nrows);
if (0 == nrows)
{
/* no matches found */
@ -3192,7 +3185,7 @@ postgres_get_coin_transactions (void *cls,
&melt->coin_sig),
TALER_PQ_result_spec_amount ("amount_with_fee",
&melt->amount_with_fee),
TALER_PQ_result_spec_amount ("amount_with_fee",
TALER_PQ_result_spec_amount ("melt_fee",
&melt->melt_fee),
TALER_PQ_result_spec_end
};
@ -3204,6 +3197,7 @@ postgres_get_coin_transactions (void *cls,
PQclear (result);
goto cleanup;
}
melt->coin.coin_pub = *coin_pub;
}
tl = GNUNET_new (struct TALER_MINTDB_TransactionList);
tl->next = head;