diff options
Diffstat (limited to 'src/auditor/taler-helper-auditor-reserves.c')
-rw-r--r-- | src/auditor/taler-helper-auditor-reserves.c | 342 |
1 files changed, 164 insertions, 178 deletions
diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c index 41580e0c7..22d7f5c27 100644 --- a/src/auditor/taler-helper-auditor-reserves.c +++ b/src/auditor/taler-helper-auditor-reserves.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of TALER | 2 | This file is part of TALER |
3 | Copyright (C) 2016-2020 Taler Systems SA | 3 | Copyright (C) 2016-2021 Taler Systems SA |
4 | 4 | ||
5 | TALER is free software; you can redistribute it and/or modify it under the | 5 | TALER is free software; you can redistribute it and/or modify it under the |
6 | terms of the GNU Affero Public License as published by the Free Software | 6 | terms of the GNU Affero Public License as published by the Free Software |
@@ -191,12 +191,17 @@ report_amount_arithmetic_inconsistency ( | |||
191 | exchange); | 191 | exchange); |
192 | } | 192 | } |
193 | TALER_ARL_report (report_amount_arithmetic_inconsistencies, | 193 | TALER_ARL_report (report_amount_arithmetic_inconsistencies, |
194 | json_pack ("{s:s, s:I, s:o, s:o, s:I}", | 194 | GNUNET_JSON_PACK ( |
195 | "operation", operation, | 195 | GNUNET_JSON_pack_string ("operation", |
196 | "rowid", (json_int_t) rowid, | 196 | operation), |
197 | "exchange", TALER_JSON_from_amount (exchange), | 197 | GNUNET_JSON_pack_uint64 ("rowid", |
198 | "auditor", TALER_JSON_from_amount (auditor), | 198 | rowid), |
199 | "profitable", (json_int_t) profitable)); | 199 | TALER_JSON_pack_amount ("exchange", |
200 | exchange), | ||
201 | TALER_JSON_pack_amount ("auditor", | ||
202 | auditor), | ||
203 | GNUNET_JSON_pack_int64 ("profitable", | ||
204 | profitable))); | ||
200 | if (0 != profitable) | 205 | if (0 != profitable) |
201 | { | 206 | { |
202 | target = (1 == profitable) | 207 | target = (1 == profitable) |
@@ -222,10 +227,13 @@ report_row_inconsistency (const char *table, | |||
222 | const char *diagnostic) | 227 | const char *diagnostic) |
223 | { | 228 | { |
224 | TALER_ARL_report (report_row_inconsistencies, | 229 | TALER_ARL_report (report_row_inconsistencies, |
225 | json_pack ("{s:s, s:I, s:s}", | 230 | GNUNET_JSON_PACK ( |
226 | "table", table, | 231 | GNUNET_JSON_pack_string ("table", |
227 | "row", (json_int_t) rowid, | 232 | table), |
228 | "diagnostic", diagnostic)); | 233 | GNUNET_JSON_pack_uint64 ("row", |
234 | rowid), | ||
235 | GNUNET_JSON_pack_string ("diagnostic", | ||
236 | diagnostic))); | ||
229 | } | 237 | } |
230 | 238 | ||
231 | 239 | ||
@@ -549,14 +557,15 @@ handle_reserve_out (void *cls, | |||
549 | (expire_withdraw.abs_value_us < execution_date.abs_value_us) ) | 557 | (expire_withdraw.abs_value_us < execution_date.abs_value_us) ) |
550 | { | 558 | { |
551 | TALER_ARL_report (denomination_key_validity_withdraw_inconsistencies, | 559 | TALER_ARL_report (denomination_key_validity_withdraw_inconsistencies, |
552 | json_pack ("{s:I, s:o, s:o, s:o}", | 560 | GNUNET_JSON_PACK ( |
553 | "row", (json_int_t) rowid, | 561 | GNUNET_JSON_pack_uint64 ("row", |
554 | "execution_date", | 562 | rowid), |
555 | TALER_ARL_json_from_time_abs (execution_date), | 563 | TALER_JSON_pack_time_abs_human ("execution_date", |
556 | "reserve_pub", GNUNET_JSON_from_data_auto ( | 564 | execution_date), |
557 | reserve_pub), | 565 | GNUNET_JSON_pack_data_auto ("reserve_pub", |
558 | "denompub_h", GNUNET_JSON_from_data_auto ( | 566 | reserve_pub), |
559 | &wsrd.h_denomination_pub))); | 567 | GNUNET_JSON_pack_data_auto ("denompub_h", |
568 | &wsrd.h_denomination_pub))); | ||
560 | } | 569 | } |
561 | 570 | ||
562 | /* check reserve_sig (first: setup remaining members of wsrd) */ | 571 | /* check reserve_sig (first: setup remaining members of wsrd) */ |
@@ -569,13 +578,15 @@ handle_reserve_out (void *cls, | |||
569 | &reserve_pub->eddsa_pub)) | 578 | &reserve_pub->eddsa_pub)) |
570 | { | 579 | { |
571 | TALER_ARL_report (report_bad_sig_losses, | 580 | TALER_ARL_report (report_bad_sig_losses, |
572 | json_pack ("{s:s, s:I, s:o, s:o}", | 581 | GNUNET_JSON_PACK ( |
573 | "operation", "withdraw", | 582 | GNUNET_JSON_pack_string ("operation", |
574 | "row", (json_int_t) rowid, | 583 | "withdraw"), |
575 | "loss", TALER_JSON_from_amount ( | 584 | GNUNET_JSON_pack_uint64 ("row", |
576 | amount_with_fee), | 585 | rowid), |
577 | "key_pub", GNUNET_JSON_from_data_auto ( | 586 | TALER_JSON_pack_amount ("loss", |
578 | reserve_pub))); | 587 | amount_with_fee), |
588 | GNUNET_JSON_pack_data_auto ("key_pub", | ||
589 | reserve_pub))); | ||
579 | TALER_ARL_amount_add (&total_bad_sig_loss, | 590 | TALER_ARL_amount_add (&total_bad_sig_loss, |
580 | &total_bad_sig_loss, | 591 | &total_bad_sig_loss, |
581 | amount_with_fee); | 592 | amount_with_fee); |
@@ -712,12 +723,15 @@ handle_recoup_by_reserve ( | |||
712 | &coin->coin_pub.eddsa_pub)) | 723 | &coin->coin_pub.eddsa_pub)) |
713 | { | 724 | { |
714 | TALER_ARL_report (report_bad_sig_losses, | 725 | TALER_ARL_report (report_bad_sig_losses, |
715 | json_pack ("{s:s, s:I, s:o, s:o}", | 726 | GNUNET_JSON_PACK ( |
716 | "operation", "recoup", | 727 | GNUNET_JSON_pack_string ("operation", |
717 | "row", (json_int_t) rowid, | 728 | "recoup"), |
718 | "loss", TALER_JSON_from_amount (amount), | 729 | GNUNET_JSON_pack_uint64 ("row", |
719 | "key_pub", GNUNET_JSON_from_data_auto ( | 730 | rowid), |
720 | &coin->coin_pub))); | 731 | TALER_JSON_pack_amount ("loss", |
732 | amount), | ||
733 | GNUNET_JSON_pack_data_auto ("key_pub", | ||
734 | &coin->coin_pub))); | ||
721 | TALER_ARL_amount_add (&total_bad_sig_loss, | 735 | TALER_ARL_amount_add (&total_bad_sig_loss, |
722 | &total_bad_sig_loss, | 736 | &total_bad_sig_loss, |
723 | amount); | 737 | amount); |
@@ -778,12 +792,15 @@ handle_recoup_by_reserve ( | |||
778 | (0 == strcmp (rev, "master signature invalid")) ) | 792 | (0 == strcmp (rev, "master signature invalid")) ) |
779 | { | 793 | { |
780 | TALER_ARL_report (report_bad_sig_losses, | 794 | TALER_ARL_report (report_bad_sig_losses, |
781 | json_pack ("{s:s, s:I, s:o, s:o}", | 795 | GNUNET_JSON_PACK ( |
782 | "operation", "recoup-master", | 796 | GNUNET_JSON_pack_string ("operation", |
783 | "row", (json_int_t) rev_rowid, | 797 | "recoup-master"), |
784 | "loss", TALER_JSON_from_amount (amount), | 798 | GNUNET_JSON_pack_uint64 ("row", |
785 | "key_pub", GNUNET_JSON_from_data_auto ( | 799 | rev_rowid), |
786 | &TALER_ARL_master_pub))); | 800 | TALER_JSON_pack_amount ("loss", |
801 | amount), | ||
802 | GNUNET_JSON_pack_data_auto ("key_pub", | ||
803 | &TALER_ARL_master_pub))); | ||
787 | TALER_ARL_amount_add (&total_bad_sig_loss, | 804 | TALER_ARL_amount_add (&total_bad_sig_loss, |
788 | &total_bad_sig_loss, | 805 | &total_bad_sig_loss, |
789 | amount); | 806 | amount); |
@@ -1051,11 +1068,11 @@ verify_reserve_balance (void *cls, | |||
1051 | &total_balance_insufficient_loss, | 1068 | &total_balance_insufficient_loss, |
1052 | &loss); | 1069 | &loss); |
1053 | TALER_ARL_report (report_reserve_balance_insufficient_inconsistencies, | 1070 | TALER_ARL_report (report_reserve_balance_insufficient_inconsistencies, |
1054 | json_pack ("{s:o, s:o}", | 1071 | GNUNET_JSON_PACK ( |
1055 | "reserve_pub", | 1072 | GNUNET_JSON_pack_data_auto ("reserve_pub", |
1056 | GNUNET_JSON_from_data_auto (&rs->reserve_pub), | 1073 | &rs->reserve_pub), |
1057 | "loss", | 1074 | TALER_JSON_pack_amount ("loss", |
1058 | TALER_JSON_from_amount (&loss))); | 1075 | &loss))); |
1059 | /* Continue with a reserve balance of zero */ | 1076 | /* Continue with a reserve balance of zero */ |
1060 | GNUNET_assert (GNUNET_OK == | 1077 | GNUNET_assert (GNUNET_OK == |
1061 | TALER_amount_set_zero (balance.currency, | 1078 | TALER_amount_set_zero (balance.currency, |
@@ -1083,12 +1100,11 @@ verify_reserve_balance (void *cls, | |||
1083 | not an actualized gain and could be trivially corrected by | 1100 | not an actualized gain and could be trivially corrected by |
1084 | restoring the summary. */// | 1101 | restoring the summary. */// |
1085 | TALER_ARL_report (report_reserve_balance_insufficient_inconsistencies, | 1102 | TALER_ARL_report (report_reserve_balance_insufficient_inconsistencies, |
1086 | json_pack ("{s:o, s:o}", | 1103 | GNUNET_JSON_PACK ( |
1087 | "reserve_pub", | 1104 | GNUNET_JSON_pack_data_auto ("reserve_pub", |
1088 | GNUNET_JSON_from_data_auto ( | 1105 | &rs->reserve_pub), |
1089 | &rs->reserve_pub), | 1106 | TALER_JSON_pack_amount ("gain", |
1090 | "gain", | 1107 | &nbalance))); |
1091 | TALER_JSON_from_amount (&nbalance))); | ||
1092 | if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) | 1108 | if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) |
1093 | { | 1109 | { |
1094 | GNUNET_break (0); | 1110 | GNUNET_break (0); |
@@ -1126,14 +1142,13 @@ verify_reserve_balance (void *cls, | |||
1126 | &delta); | 1142 | &delta); |
1127 | } | 1143 | } |
1128 | TALER_ARL_report (report_reserve_balance_summary_wrong_inconsistencies, | 1144 | TALER_ARL_report (report_reserve_balance_summary_wrong_inconsistencies, |
1129 | json_pack ("{s:o, s:o, s:o}", | 1145 | GNUNET_JSON_PACK ( |
1130 | "reserve_pub", | 1146 | GNUNET_JSON_pack_data_auto ("reserve_pub", |
1131 | GNUNET_JSON_from_data_auto ( | 1147 | &rs->reserve_pub), |
1132 | &rs->reserve_pub), | 1148 | TALER_JSON_pack_amount ("exchange", |
1133 | "exchange", | 1149 | &reserve.balance), |
1134 | TALER_JSON_from_amount (&reserve.balance), | 1150 | TALER_JSON_pack_amount ("auditor", |
1135 | "auditor", | 1151 | &nbalance))); |
1136 | TALER_JSON_from_amount (&nbalance))); | ||
1137 | } | 1152 | } |
1138 | } | 1153 | } |
1139 | } /* end of 'if (internal_checks)' */ | 1154 | } /* end of 'if (internal_checks)' */ |
@@ -1160,16 +1175,15 @@ verify_reserve_balance (void *cls, | |||
1160 | TALER_ARL_amount_add (&total_balance_reserve_not_closed, | 1175 | TALER_ARL_amount_add (&total_balance_reserve_not_closed, |
1161 | &total_balance_reserve_not_closed, | 1176 | &total_balance_reserve_not_closed, |
1162 | &nbalance); | 1177 | &nbalance); |
1163 | TALER_ARL_report (report_reserve_not_closed_inconsistencies, | 1178 | TALER_ARL_report ( |
1164 | json_pack ("{s:o, s:o, s:o}", | 1179 | report_reserve_not_closed_inconsistencies, |
1165 | "reserve_pub", | 1180 | GNUNET_JSON_PACK ( |
1166 | GNUNET_JSON_from_data_auto ( | 1181 | GNUNET_JSON_pack_data_auto ("reserve_pub", |
1167 | &rs->reserve_pub), | 1182 | &rs->reserve_pub), |
1168 | "balance", | 1183 | TALER_JSON_pack_amount ("balance", |
1169 | TALER_JSON_from_amount (&nbalance), | 1184 | &nbalance), |
1170 | "expiration_time", | 1185 | TALER_JSON_pack_time_abs_human ("expiration_time", |
1171 | TALER_ARL_json_from_time_abs ( | 1186 | rs->a_expiration_date))); |
1172 | rs->a_expiration_date))); | ||
1173 | } | 1187 | } |
1174 | } | 1188 | } |
1175 | else | 1189 | else |
@@ -1179,17 +1193,15 @@ verify_reserve_balance (void *cls, | |||
1179 | &total_balance_reserve_not_closed, | 1193 | &total_balance_reserve_not_closed, |
1180 | &nbalance); | 1194 | &nbalance); |
1181 | TALER_ARL_report (report_reserve_not_closed_inconsistencies, | 1195 | TALER_ARL_report (report_reserve_not_closed_inconsistencies, |
1182 | json_pack ("{s:o, s:o, s:o, s:s}", | 1196 | GNUNET_JSON_PACK ( |
1183 | "reserve_pub", | 1197 | GNUNET_JSON_pack_data_auto ("reserve_pub", |
1184 | GNUNET_JSON_from_data_auto ( | 1198 | &rs->reserve_pub), |
1185 | &rs->reserve_pub), | 1199 | TALER_JSON_pack_amount ("balance", |
1186 | "balance", | 1200 | &nbalance), |
1187 | TALER_JSON_from_amount (&nbalance), | 1201 | TALER_JSON_pack_time_abs_human ("expiration_time", |
1188 | "expiration_time", | 1202 | rs->a_expiration_date), |
1189 | TALER_ARL_json_from_time_abs ( | 1203 | GNUNET_JSON_pack_string ("diagnostic", |
1190 | rs->a_expiration_date), | 1204 | "could not determine closing fee"))); |
1191 | "diagnostic", | ||
1192 | "could not determine closing fee")); | ||
1193 | } | 1205 | } |
1194 | } | 1206 | } |
1195 | 1207 | ||
@@ -1489,7 +1501,7 @@ run (void *cls, | |||
1489 | if (GNUNET_OK != | 1501 | if (GNUNET_OK != |
1490 | TALER_ARL_init (c)) | 1502 | TALER_ARL_init (c)) |
1491 | { | 1503 | { |
1492 | global_ret = 1; | 1504 | global_ret = EXIT_FAILURE; |
1493 | return; | 1505 | return; |
1494 | } | 1506 | } |
1495 | if (GNUNET_OK != | 1507 | if (GNUNET_OK != |
@@ -1501,7 +1513,7 @@ run (void *cls, | |||
1501 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 1513 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
1502 | "exchangedb", | 1514 | "exchangedb", |
1503 | "IDLE_RESERVE_EXPIRATION_TIME"); | 1515 | "IDLE_RESERVE_EXPIRATION_TIME"); |
1504 | global_ret = 1; | 1516 | global_ret = EXIT_FAILURE; |
1505 | return; | 1517 | return; |
1506 | } | 1518 | } |
1507 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1519 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1559,103 +1571,77 @@ run (void *cls, | |||
1559 | TALER_ARL_setup_sessions_and_run (&analyze_reserves, | 1571 | TALER_ARL_setup_sessions_and_run (&analyze_reserves, |
1560 | NULL)) | 1572 | NULL)) |
1561 | { | 1573 | { |
1562 | global_ret = 1; | 1574 | global_ret = EXIT_FAILURE; |
1563 | return; | 1575 | return; |
1564 | } | 1576 | } |
1565 | { | 1577 | TALER_ARL_done ( |
1566 | json_t *report; | 1578 | GNUNET_JSON_PACK ( |
1567 | 1579 | GNUNET_JSON_pack_array_steal ( | |
1568 | report = json_pack ("{s:o, s:o, s:o, s:o, s:o," | 1580 | "reserve_balance_insufficient_inconsistencies", |
1569 | " s:o, s:o, s:o, s:o, s:o," | 1581 | report_reserve_balance_insufficient_inconsistencies), |
1570 | " s:o, s:o, s:o, s:o, s:o," | 1582 | /* Tested in test-auditor.sh #3 */ |
1571 | " s:o, s:o, s:o, s:o, s:I," | 1583 | TALER_JSON_pack_amount ("total_loss_balance_insufficient", |
1572 | " s:I, s:I, s:I, s:I, s:I," | 1584 | &total_balance_insufficient_loss), |
1573 | " s:I, s:I }", | 1585 | /* Tested in test-auditor.sh #3 */ |
1574 | /* blocks #1 */ | 1586 | GNUNET_JSON_pack_array_steal ( |
1575 | "reserve_balance_insufficient_inconsistencies", | 1587 | "reserve_balance_summary_wrong_inconsistencies", |
1576 | report_reserve_balance_insufficient_inconsistencies, | 1588 | report_reserve_balance_summary_wrong_inconsistencies), |
1577 | /* Tested in test-auditor.sh #3 */ | 1589 | TALER_JSON_pack_amount ("total_balance_summary_delta_plus", |
1578 | "total_loss_balance_insufficient", | 1590 | &total_balance_summary_delta_plus), |
1579 | TALER_JSON_from_amount ( | 1591 | TALER_JSON_pack_amount ("total_balance_summary_delta_minus", |
1580 | &total_balance_insufficient_loss), | 1592 | &total_balance_summary_delta_minus), |
1581 | /* Tested in test-auditor.sh #3 */ | 1593 | /* blocks #2 */ |
1582 | "reserve_balance_summary_wrong_inconsistencies", | 1594 | TALER_JSON_pack_amount ("total_escrow_balance", |
1583 | report_reserve_balance_summary_wrong_inconsistencies, | 1595 | &total_escrow_balance), |
1584 | "total_balance_summary_delta_plus", | 1596 | TALER_JSON_pack_amount ("total_withdraw_fee_income", |
1585 | TALER_JSON_from_amount ( | 1597 | &total_withdraw_fee_income), |
1586 | &total_balance_summary_delta_plus), | 1598 | /* Tested in test-auditor.sh #21 */ |
1587 | "total_balance_summary_delta_minus", | 1599 | GNUNET_JSON_pack_array_steal ("reserve_not_closed_inconsistencies", |
1588 | TALER_JSON_from_amount ( | 1600 | report_reserve_not_closed_inconsistencies), |
1589 | &total_balance_summary_delta_minus), | 1601 | /* Tested in test-auditor.sh #21 */ |
1590 | /* blocks #2 */ | 1602 | TALER_JSON_pack_amount ("total_balance_reserve_not_closed", |
1591 | "total_escrow_balance", | 1603 | &total_balance_reserve_not_closed), |
1592 | TALER_JSON_from_amount (&total_escrow_balance), | 1604 | /* Tested in test-auditor.sh #7 */ |
1593 | "total_withdraw_fee_income", | 1605 | GNUNET_JSON_pack_array_steal ("bad_sig_losses", |
1594 | TALER_JSON_from_amount ( | 1606 | report_bad_sig_losses), |
1595 | &total_withdraw_fee_income), | 1607 | /* Tested in test-auditor.sh #7 */ |
1596 | /* Tested in test-auditor.sh #21 */ | 1608 | TALER_JSON_pack_amount ("total_bad_sig_loss", |
1597 | "reserve_not_closed_inconsistencies", | 1609 | &total_bad_sig_loss), |
1598 | report_reserve_not_closed_inconsistencies, | 1610 | /* Tested in test-revocation.sh #4 */ |
1599 | /* Tested in test-auditor.sh #21 */ | 1611 | GNUNET_JSON_pack_array_steal ("row_inconsistencies", |
1600 | "total_balance_reserve_not_closed", | 1612 | report_row_inconsistencies), |
1601 | TALER_JSON_from_amount ( | 1613 | /* Tested in test-auditor.sh #23 */ |
1602 | &total_balance_reserve_not_closed), | 1614 | GNUNET_JSON_pack_array_steal ( |
1603 | /* Tested in test-auditor.sh #7 */ | 1615 | "denomination_key_validity_withdraw_inconsistencies", |
1604 | "bad_sig_losses", | 1616 | denomination_key_validity_withdraw_inconsistencies), |
1605 | report_bad_sig_losses, | 1617 | GNUNET_JSON_pack_array_steal ("amount_arithmetic_inconsistencies", |
1606 | /* blocks #3 */ | 1618 | report_amount_arithmetic_inconsistencies), |
1607 | /* Tested in test-auditor.sh #7 */ | 1619 | TALER_JSON_pack_amount ("total_arithmetic_delta_plus", |
1608 | "total_bad_sig_loss", | 1620 | &total_arithmetic_delta_plus), |
1609 | TALER_JSON_from_amount (&total_bad_sig_loss), | 1621 | TALER_JSON_pack_amount ("total_arithmetic_delta_minus", |
1610 | /* Tested in test-revocation.sh #4 */ | 1622 | &total_arithmetic_delta_minus), |
1611 | "row_inconsistencies", | 1623 | TALER_JSON_pack_time_abs_human ("auditor_start_time", |
1612 | report_row_inconsistencies, | 1624 | start_time), |
1613 | /* Tested in test-auditor.sh #23 */ | 1625 | TALER_JSON_pack_time_abs_human ("auditor_end_time", |
1614 | "denomination_key_validity_withdraw_inconsistencies", | 1626 | GNUNET_TIME_absolute_get ()), |
1615 | denomination_key_validity_withdraw_inconsistencies, | 1627 | TALER_JSON_pack_amount ("total_irregular_recoups", |
1616 | "amount_arithmetic_inconsistencies", | 1628 | &total_irregular_recoups), |
1617 | report_amount_arithmetic_inconsistencies, | 1629 | GNUNET_JSON_pack_uint64 ("start_ppr_reserve_in_serial_id", |
1618 | "total_arithmetic_delta_plus", | 1630 | ppr_start.last_reserve_in_serial_id), |
1619 | TALER_JSON_from_amount ( | 1631 | GNUNET_JSON_pack_uint64 ("start_ppr_reserve_out_serial_id", |
1620 | &total_arithmetic_delta_plus), | 1632 | ppr_start.last_reserve_out_serial_id), |
1621 | /* blocks #4 */ | 1633 | GNUNET_JSON_pack_uint64 ("start_ppr_reserve_recoup_serial_id", |
1622 | "total_arithmetic_delta_minus", | 1634 | ppr_start.last_reserve_recoup_serial_id), |
1623 | TALER_JSON_from_amount ( | 1635 | GNUNET_JSON_pack_uint64 ("start_ppr_reserve_close_serial_id", |
1624 | &total_arithmetic_delta_minus), | 1636 | ppr_start.last_reserve_close_serial_id), |
1625 | "auditor_start_time", | 1637 | GNUNET_JSON_pack_uint64 ("end_ppr_reserve_in_serial_id", |
1626 | TALER_ARL_json_from_time_abs ( | 1638 | ppr.last_reserve_in_serial_id), |
1627 | start_time), | 1639 | GNUNET_JSON_pack_uint64 ("end_ppr_reserve_out_serial_id", |
1628 | "auditor_end_time", | 1640 | ppr.last_reserve_out_serial_id), |
1629 | TALER_ARL_json_from_time_abs ( | 1641 | GNUNET_JSON_pack_uint64 ("end_ppr_reserve_recoup_serial_id", |
1630 | GNUNET_TIME_absolute_get ()), | 1642 | ppr.last_reserve_recoup_serial_id), |
1631 | "total_irregular_recoups", | 1643 | GNUNET_JSON_pack_uint64 ("end_ppr_reserve_close_serial_id", |
1632 | TALER_JSON_from_amount ( | 1644 | ppr.last_reserve_close_serial_id))); |
1633 | &total_irregular_recoups), | ||
1634 | "start_ppr_reserve_in_serial_id", | ||
1635 | (json_int_t) ppr_start.last_reserve_in_serial_id, | ||
1636 | /* blocks #5 */ | ||
1637 | "start_ppr_reserve_out_serial_id", | ||
1638 | (json_int_t) ppr_start. | ||
1639 | last_reserve_out_serial_id, | ||
1640 | "start_ppr_reserve_recoup_serial_id", | ||
1641 | (json_int_t) ppr_start. | ||
1642 | last_reserve_recoup_serial_id, | ||
1643 | "start_ppr_reserve_close_serial_id", | ||
1644 | (json_int_t) ppr_start. | ||
1645 | last_reserve_close_serial_id, | ||
1646 | "end_ppr_reserve_in_serial_id", | ||
1647 | (json_int_t) ppr.last_reserve_in_serial_id, | ||
1648 | "end_ppr_reserve_out_serial_id", | ||
1649 | (json_int_t) ppr.last_reserve_out_serial_id, | ||
1650 | /* blocks #6 */ | ||
1651 | "end_ppr_reserve_recoup_serial_id", | ||
1652 | (json_int_t) ppr.last_reserve_recoup_serial_id, | ||
1653 | "end_ppr_reserve_close_serial_id", | ||
1654 | (json_int_t) ppr.last_reserve_close_serial_id | ||
1655 | ); | ||
1656 | GNUNET_break (NULL != report); | ||
1657 | TALER_ARL_done (report); | ||
1658 | } | ||
1659 | } | 1645 | } |
1660 | 1646 | ||
1661 | 1647 | ||
@@ -1693,7 +1679,7 @@ main (int argc, | |||
1693 | if (GNUNET_OK != | 1679 | if (GNUNET_OK != |
1694 | GNUNET_STRINGS_get_utf8_args (argc, argv, | 1680 | GNUNET_STRINGS_get_utf8_args (argc, argv, |
1695 | &argc, &argv)) | 1681 | &argc, &argv)) |
1696 | return 4; | 1682 | return EXIT_INVALIDARGUMENT; |
1697 | ret = GNUNET_PROGRAM_run ( | 1683 | ret = GNUNET_PROGRAM_run ( |
1698 | argc, | 1684 | argc, |
1699 | argv, | 1685 | argv, |
@@ -1704,9 +1690,9 @@ main (int argc, | |||
1704 | NULL); | 1690 | NULL); |
1705 | GNUNET_free_nz ((void *) argv); | 1691 | GNUNET_free_nz ((void *) argv); |
1706 | if (GNUNET_SYSERR == ret) | 1692 | if (GNUNET_SYSERR == ret) |
1707 | return 3; | 1693 | return EXIT_INVALIDARGUMENT; |
1708 | if (GNUNET_NO == ret) | 1694 | if (GNUNET_NO == ret) |
1709 | return 0; | 1695 | return EXIT_SUCCESS; |
1710 | return global_ret; | 1696 | return global_ret; |
1711 | } | 1697 | } |
1712 | 1698 | ||