the big EC rename

This commit is contained in:
Christian Grothoff 2020-03-22 00:50:18 +01:00
parent db61bc3bbe
commit 744322fdda
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
15 changed files with 248 additions and 243 deletions

@ -1 +1 @@
Subproject commit 934a6a18301e81c4fd1b3a8cda2dc13dca4741cc
Subproject commit ca53235ccfa0458ebf11c204888ca370e20ec3f5

0
src/auditor/taler-helper-auditor-render.py Executable file → Normal file
View File

View File

@ -233,7 +233,7 @@ deposits_get_transaction (void *cls,
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_TRACK_TRANSACTION_DB_FETCH_FAILED,
TALER_EC_DEPOSITS_GET_DB_FETCH_FAILED,
"failed to fetch transaction data");
}
return qs;
@ -242,7 +242,7 @@ deposits_get_transaction (void *cls,
{
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_TRACK_TRANSACTION_NOT_FOUND,
TALER_EC_DEPOSITS_GET_NOT_FOUND,
"transaction unknown");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -288,7 +288,7 @@ handle_track_transaction_request (
if (GNUNET_SYSERR == ctx.pending)
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_TRACK_TRANSACTION_DB_FEE_INCONSISTENT,
TALER_EC_DEPOSITS_GET_DB_FEE_INCONSISTENT,
"fees are inconsistent");
return reply_deposit_details (connection,
&tps->h_contract_terms,
@ -387,7 +387,7 @@ TEH_handler_deposits_get (const struct TEH_RequestHandler *rh,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
TALER_EC_TRACK_TRANSACTION_MERCHANT_SIGNATURE_INVALID,
TALER_EC_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID,
"merchant_sig");
}

View File

@ -164,7 +164,7 @@ link_transaction (void *cls,
{
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_REFRESH_LINK_COIN_UNKNOWN,
TALER_EC_LINK_COIN_UNKNOWN,
"coin_pub");
return GNUNET_DB_STATUS_HARD_ERROR;
}

View File

@ -63,7 +63,7 @@ reply_melt_insufficient_funds (
if (NULL == history)
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_MELT_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS,
TALER_EC_MELT_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS,
"Failed to compile transaction history");
return TALER_MHD_reply_json_pack (connection,
MHD_HTTP_CONFLICT,
@ -72,7 +72,7 @@ reply_melt_insufficient_funds (
"insufficient funds",
"code",
(json_int_t)
TALER_EC_REFRESH_MELT_INSUFFICIENT_FUNDS,
TALER_EC_MELT_INSUFFICIENT_FUNDS,
"coin_pub",
GNUNET_JSON_from_data_auto (coin_pub),
"original_value",
@ -195,7 +195,7 @@ refresh_check_melt (struct MHD_Connection *connection,
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_MELT_DB_FETCH_ERROR,
TALER_EC_MELT_DB_FETCH_ERROR,
"failed to fetch old coin history");
return qs;
}
@ -222,7 +222,7 @@ refresh_check_melt (struct MHD_Connection *connection,
tl);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESH_MELT_COIN_EXPIRED_NO_ZOMBIE,
TALER_EC_MELT_COIN_EXPIRED_NO_ZOMBIE,
"denomination expired");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -237,7 +237,7 @@ refresh_check_melt (struct MHD_Connection *connection,
tl);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_MELT_COIN_HISTORY_COMPUTATION_FAILED,
TALER_EC_MELT_COIN_HISTORY_COMPUTATION_FAILED,
"failed to compute coin transaction history");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -323,7 +323,7 @@ melt_transaction (void *cls,
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_MELT_DB_FETCH_ERROR,
TALER_EC_MELT_DB_FETCH_ERROR,
"failed to fetch melt index");
return qs;
}
@ -349,7 +349,7 @@ melt_transaction (void *cls,
{
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_MELT_DB_STORE_SESSION_ERROR,
TALER_EC_MELT_DB_STORE_SESSION_ERROR,
"failed to persist melt data");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -398,7 +398,7 @@ handle_melt (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
TALER_EC_REFRESH_MELT_COIN_SIGNATURE_INVALID,
TALER_EC_MELT_COIN_SIGNATURE_INVALID,
"confirm_sig");
}
}
@ -491,7 +491,7 @@ check_for_denomination_key (struct MHD_Connection *connection,
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_MELT_DB_FETCH_ERROR,
TALER_EC_MELT_DB_FETCH_ERROR,
"failed to find information about old coin");
}
/* sanity check */
@ -561,7 +561,7 @@ check_for_denomination_key (struct MHD_Connection *connection,
TEH_KS_release (key_state);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
TALER_EC_REFRESH_MELT_DENOMINATION_SIGNATURE_INVALID,
TALER_EC_MELT_DENOMINATION_SIGNATURE_INVALID,
"denom_sig");
}
}
@ -593,7 +593,7 @@ check_for_denomination_key (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESH_MELT_FEES_EXCEED_CONTRIBUTION,
TALER_EC_MELT_FEES_EXCEED_CONTRIBUTION,
"melt amount smaller than melting fee");
}
return handle_melt (connection,

View File

@ -256,7 +256,7 @@ refreshes_reveal_preflight (void *cls,
GNUNET_break (qs);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_DB_FETCH_REVEAL_ERROR,
TALER_EC_REVEAL_DB_FETCH_REVEAL_ERROR,
"failed to fetch reveal data");
rctx->preflight_ok = GNUNET_SYSERR;
return GNUNET_DB_STATUS_HARD_ERROR;
@ -308,7 +308,7 @@ refreshes_reveal_transaction (void *cls,
{
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_REFRESH_REVEAL_SESSION_UNKNOWN,
TALER_EC_REVEAL_SESSION_UNKNOWN,
"rc");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -320,7 +320,7 @@ refreshes_reveal_transaction (void *cls,
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_DB_FETCH_SESSION_ERROR,
TALER_EC_REVEAL_DB_FETCH_SESSION_ERROR,
"failed to fetch valid challenge from database");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -413,7 +413,7 @@ refreshes_reveal_transaction (void *cls,
"hint", "commitment violation",
"code",
(json_int_t)
TALER_EC_REFRESH_REVEAL_COMMITMENT_VIOLATION,
TALER_EC_REVEAL_COMMITMENT_VIOLATION,
"rc_expected",
GNUNET_JSON_from_data_auto (
&rc_expected));
@ -448,7 +448,7 @@ refreshes_reveal_transaction (void *cls,
GNUNET_break_op (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_COST_CALCULATION_OVERFLOW,
TALER_EC_REVEAL_COST_CALCULATION_OVERFLOW,
"failed to add up refresh costs");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -459,7 +459,7 @@ refreshes_reveal_transaction (void *cls,
GNUNET_break_op (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_AMOUNT_INSUFFICIENT,
TALER_EC_REVEAL_AMOUNT_INSUFFICIENT,
"melted coin value is insufficient to cover cost of operation");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -514,7 +514,7 @@ refreshes_reveal_persist (void *cls,
{
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_DB_COMMIT_ERROR,
TALER_EC_REVEAL_DB_COMMIT_ERROR,
"failed to persist reveal data");
}
return qs;
@ -626,13 +626,13 @@ resolve_refreshes_reveal_denominations (struct TEH_KS_StateHandle *key_state,
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
res = TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_REFRESH_REVEAL_SESSION_UNKNOWN,
TALER_EC_REVEAL_SESSION_UNKNOWN,
"rc");
break;
case GNUNET_DB_STATUS_HARD_ERROR:
res = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_DB_FETCH_SESSION_ERROR,
TALER_EC_REVEAL_DB_FETCH_SESSION_ERROR,
"failed to fetch session data");
break;
case GNUNET_DB_STATUS_SOFT_ERROR:
@ -685,7 +685,7 @@ resolve_refreshes_reveal_denominations (struct TEH_KS_StateHandle *key_state,
GNUNET_break_op (0);
res = TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
TALER_EC_REFRESH_REVEAL_LINK_SIGNATURE_INVALID,
TALER_EC_REVEAL_LINK_SIGNATURE_INVALID,
"link_sig");
goto cleanup;
}
@ -712,7 +712,7 @@ resolve_refreshes_reveal_denominations (struct TEH_KS_StateHandle *key_state,
GNUNET_break (0);
res = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_SIGNING_ERROR,
TALER_EC_REVEAL_SIGNING_ERROR,
"internal signing error");
goto cleanup;
}
@ -827,7 +827,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESH_REVEAL_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE,
TALER_EC_REVEAL_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE,
"new_denoms_h");
}
@ -837,7 +837,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESH_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH,
TALER_EC_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH,
"new_denoms/coin_evs");
}
if (json_array_size (new_denoms_h_json) !=
@ -846,7 +846,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESH_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH,
TALER_EC_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH,
"new_denoms/link_sigs");
}
@ -878,7 +878,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection,
TALER_LOG_ERROR ("Lacking keys to operate\n");
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_REFRESH_REVEAL_KEYS_MISSING,
TALER_EC_REVEAL_KEYS_MISSING,
"exchange lacks keys");
}
ret = resolve_refreshes_reveal_denominations (key_state,
@ -941,7 +941,7 @@ TEH_handler_reveal (const struct TEH_RequestHandler *rh,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESHES_INVALID_RCH,
TALER_EC_REVEAL_INVALID_RCH,
"refresh commitment hash malformed");
}
if (0 != strcmp (args[1],
@ -975,7 +975,7 @@ TEH_handler_reveal (const struct TEH_RequestHandler *rh,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_REFRESH_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID,
TALER_EC_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID,
"transfer_privs");
}

View File

@ -445,7 +445,7 @@ get_transfer_deposits (void *cls,
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_TRACK_TRANSFER_DB_FETCH_FAILED,
TALER_EC_TRANSFERS_GET_DB_FETCH_FAILED,
"failed to fetch transaction data");
}
return qs;
@ -455,7 +455,7 @@ get_transfer_deposits (void *cls,
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_TRACK_TRANSFER_DB_INCONSISTENT,
TALER_EC_TRANSFERS_GET_DB_INCONSISTENT,
"exchange database internally inconsistent");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -463,7 +463,7 @@ get_transfer_deposits (void *cls,
{
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_TRACK_TRANSFER_WTID_NOT_FOUND,
TALER_EC_TRANSFERS_GET_WTID_NOT_FOUND,
"wtid");
return GNUNET_DB_STATUS_HARD_ERROR;
}
@ -484,7 +484,7 @@ get_transfer_deposits (void *cls,
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_TRACK_TRANSFER_WIRE_FEE_NOT_FOUND,
TALER_EC_TRANSFERS_GET_WIRE_FEE_NOT_FOUND,
"did not find wire fee");
}
return qs;
@ -497,7 +497,7 @@ get_transfer_deposits (void *cls,
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_TRACK_TRANSFER_WIRE_FEE_INCONSISTENT,
TALER_EC_TRANSFERS_GET_WIRE_FEE_INCONSISTENT,
"could not subtract wire fee");
return GNUNET_DB_STATUS_HARD_ERROR;
}

File diff suppressed because it is too large Load Diff

View File

@ -365,7 +365,7 @@ handle_link_finished (void *cls,
{
GNUNET_break_op (0);
response_code = 0;
ec = TALER_EC_REFRESH_LINK_REPLY_MALFORMED;
ec = TALER_EC_LINK_REPLY_MALFORMED;
break;
}
GNUNET_assert (NULL == lh->link_cb);

View File

@ -222,7 +222,7 @@ handle_refresh_reveal_finished (void *cls,
if (GNUNET_OK != ret)
{
response_code = 0;
ec = TALER_EC_REFRESH_REVEAL_REPLY_MALFORMED;
ec = TALER_EC_REVEAL_REPLY_MALFORMED;
}
else
{

View File

@ -275,7 +275,7 @@ handle_transfers_get_finished (void *cls,
j))
return;
GNUNET_break_op (0);
ec = TALER_EC_TRACK_TRANSFER_REPLY_MALFORMED;
ec = TALER_EC_TRANSFERS_GET_REPLY_MALFORMED;
response_code = 0;
break;
case MHD_HTTP_BAD_REQUEST: