diff options
| author | Christian Grothoff <christian@grothoff.org> | 2015-08-14 15:19:50 +0200 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2015-08-14 15:19:50 +0200 | 
| commit | c21da52b685cce8b806f5554b2722765735bd877 (patch) | |
| tree | db88f91ae2dcc550a0b7ef816b6ff4abb87f0ceb /src/mint-lib | |
| parent | 6173324cd938f658006a652d9b10acd8235f6d88 (diff) | |
swap dimensions as per protocol spec
Diffstat (limited to 'src/mint-lib')
| -rw-r--r-- | src/mint-lib/mint_api_refresh.c | 20 | ||||
| -rw-r--r-- | src/mint-lib/test_mint_api.c | 6 | 
2 files changed, 16 insertions, 10 deletions
diff --git a/src/mint-lib/mint_api_refresh.c b/src/mint-lib/mint_api_refresh.c index 3e50047b..92535263 100644 --- a/src/mint-lib/mint_api_refresh.c +++ b/src/mint-lib/mint_api_refresh.c @@ -1951,19 +1951,19 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint,    /* build array of transfer private keys */    transfer_privs = json_array (); -  for (i=0;i<md->num_melted_coins;i++) +  for (j=0;j<TALER_CNC_KAPPA;j++)    { -    const struct MeltedCoin *mc = &md->melted_coins[i]; - +    if (j == noreveal_index) +    { +      /* This is crucial: exclude the transfer key for the +	 noreval index! */ +      continue; +    }      tmp = json_array (); -    for (j=0;j<TALER_CNC_KAPPA;j++) +    for (i=0;i<md->num_melted_coins;i++)      { -      if (j == noreveal_index) -      { -        /* This is crucial: exclude the transfer key for the -           noreval index! */ -        continue; -      } +      const struct MeltedCoin *mc = &md->melted_coins[i]; +        json_array_append (tmp,                           TALER_json_from_data (&mc->transfer_priv[j],                                                 sizeof (struct TALER_TransferPrivateKeyP))); diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c index 19b50373..bbe81d5a 100644 --- a/src/mint-lib/test_mint_api.c +++ b/src/mint-lib/test_mint_api.c @@ -684,6 +684,7 @@ withdraw_status_cb (void *cls,                  http_status,                  cmd->label);      GNUNET_break (0); +    json_dumpf (json, stderr, 0);      fail (is);      return;    } @@ -792,6 +793,7 @@ withdraw_sign_cb (void *cls,                  "Unexpected response code %u to command %s\n",                  http_status,                  cmd->label); +    json_dumpf (full_response, stderr, 0);      GNUNET_break (0);      fail (is);      return; @@ -846,6 +848,7 @@ deposit_cb (void *cls,                  "Unexpected response code %u to command %s\n",                  http_status,                  cmd->label); +    json_dumpf (obj, stderr, 0);      fail (is);      return;    } @@ -881,6 +884,7 @@ melt_cb (void *cls,                  "Unexpected response code %u to command %s\n",                  http_status,                  cmd->label); +    json_dumpf (full_response, stderr, 0);      fail (is);      return;    } @@ -922,6 +926,7 @@ reveal_cb (void *cls,                  "Unexpected response code %u to command %s\n",                  http_status,                  cmd->label); +    json_dumpf (full_response, stderr, 0);      fail (is);      return;    } @@ -987,6 +992,7 @@ link_cb (void *cls,                  "Unexpected response code %u to command %s\n",                  http_status,                  cmd->label); +    json_dumpf (full_response, stderr, 0);      fail (is);      return;    }  | 
