-fix balance calculation
This commit is contained in:
parent
f3629bdafc
commit
7dcd217b60
@ -379,7 +379,7 @@ run (void *cls)
|
||||
|
||||
j = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
|
||||
TOTAL);
|
||||
if (! bm_select ((0 == f)? conn2 : conn,
|
||||
if (! bm_select ((0 == f) ? conn2 : conn,
|
||||
j))
|
||||
{
|
||||
GNUNET_PQ_disconnect (conn);
|
||||
@ -422,7 +422,7 @@ run (void *cls)
|
||||
|
||||
j = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
|
||||
TOTAL);
|
||||
if (! bhm_select ((0 == f)? conn2 : conn,
|
||||
if (! bhm_select ((0 == f) ? conn2 : conn,
|
||||
j))
|
||||
{
|
||||
GNUNET_PQ_disconnect (conn);
|
||||
@ -465,7 +465,7 @@ run (void *cls)
|
||||
|
||||
j = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
|
||||
TOTAL);
|
||||
if (! bem_select ((0 == f)? conn2 : conn,
|
||||
if (! bem_select ((0 == f) ? conn2 : conn,
|
||||
j))
|
||||
{
|
||||
GNUNET_PQ_disconnect (conn);
|
||||
|
@ -46,8 +46,9 @@ enum TALER_EXTENSION_ReturnValue
|
||||
* The default age mask represents the age groups
|
||||
* 0-7, 8-9, 10-11, 12-13, 14-15, 16-17, 18-20, 21-...
|
||||
*/
|
||||
#define TALER_EXTENSION_DEFAULT_AGE_MASK (1 | 1 << 8 | 1 << 10 | 1 << 12 | 1 << \
|
||||
14 | 1 << 16 | 1 << 18 | 1 << 21)
|
||||
#define TALER_EXTENSION_DEFAULT_AGE_MASK (1 | 1 << 8 | 1 << 10 | 1 << 12 | 1 \
|
||||
<< 14 | 1 << 16 | 1 << 18 | 1 \
|
||||
<< 21)
|
||||
|
||||
/**
|
||||
* @param groups String representation of age groups, like: "8:10:12:14:16:18:21"
|
||||
|
@ -767,6 +767,8 @@ TALER_EXCHANGE_verify_coin_history (
|
||||
else if (0 == strcasecmp (type,
|
||||
"RECOUP-REFRESH"))
|
||||
{
|
||||
/* This is the coin that was subjected to a recoup,
|
||||
the value being credited to the old coin. */
|
||||
struct TALER_RecoupRefreshConfirmationPS pc = {
|
||||
.purpose.size = htonl (sizeof (pc)),
|
||||
.purpose.purpose = htonl (
|
||||
@ -831,12 +833,13 @@ TALER_EXCHANGE_verify_coin_history (
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
*h_denom_pub = rr.h_denom_pub;
|
||||
add = GNUNET_YES; // FIXME: one of these should be a "NO"
|
||||
// => need better tests!!!
|
||||
add = GNUNET_YES;
|
||||
}
|
||||
else if (0 == strcasecmp (type,
|
||||
"OLD-COIN-RECOUP"))
|
||||
{
|
||||
/* This is the coin that was credited in a recoup,
|
||||
the value being credited to the this coin. */
|
||||
struct TALER_RecoupRefreshConfirmationPS pc = {
|
||||
.purpose.size = htonl (sizeof (pc)),
|
||||
.purpose.purpose = htonl (
|
||||
@ -879,7 +882,7 @@ TALER_EXCHANGE_verify_coin_history (
|
||||
GNUNET_break_op (0);
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
add = GNUNET_YES; // FIXME: one of these should be a "NO"
|
||||
add = GNUNET_NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user