diff options
Diffstat (limited to 'src/auditor/taler-wire-auditor.c')
-rw-r--r-- | src/auditor/taler-wire-auditor.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/auditor/taler-wire-auditor.c b/src/auditor/taler-wire-auditor.c index 85638fa76..fe6b66015 100644 --- a/src/auditor/taler-wire-auditor.c +++ b/src/auditor/taler-wire-auditor.c | |||
@@ -417,7 +417,7 @@ do_shutdown (void *cls) | |||
417 | report_wire_out_inconsistencies, | 417 | report_wire_out_inconsistencies, |
418 | "total_wire_out_delta_plus", | 418 | "total_wire_out_delta_plus", |
419 | TALER_JSON_from_amount (&total_bad_amount_out_plus), | 419 | TALER_JSON_from_amount (&total_bad_amount_out_plus), |
420 | /* Tested in test-auditor.sh #11, #15 */ | 420 | /* Tested in test-auditor.sh #11, #15, #19 */ |
421 | "total_wire_out_delta_minus", | 421 | "total_wire_out_delta_minus", |
422 | TALER_JSON_from_amount (&total_bad_amount_out_minus), | 422 | TALER_JSON_from_amount (&total_bad_amount_out_minus), |
423 | /* Tested in test-auditor.sh #2 */ | 423 | /* Tested in test-auditor.sh #2 */ |
@@ -442,8 +442,10 @@ do_shutdown (void *cls) | |||
442 | "row_minor_inconsistencies", | 442 | "row_minor_inconsistencies", |
443 | report_row_minor_inconsistencies, | 443 | report_row_minor_inconsistencies, |
444 | /* block */ | 444 | /* block */ |
445 | /* Tested in test-auditor.sh #19 */ | ||
445 | "total_wire_format_amount", | 446 | "total_wire_format_amount", |
446 | TALER_JSON_from_amount (&total_wire_format_amount), | 447 | TALER_JSON_from_amount (&total_wire_format_amount), |
448 | /* Tested in test-auditor.sh #19 */ | ||
447 | "wire_format_inconsistencies", | 449 | "wire_format_inconsistencies", |
448 | report_wire_format_inconsistencies, | 450 | report_wire_format_inconsistencies, |
449 | "total_amount_lag", | 451 | "total_amount_lag", |
@@ -910,7 +912,7 @@ wire_out_cb (void *cls, | |||
910 | } | 912 | } |
911 | } | 913 | } |
912 | 914 | ||
913 | cleanup: | 915 | cleanup: |
914 | GNUNET_assert (GNUNET_OK == | 916 | GNUNET_assert (GNUNET_OK == |
915 | free_roi (NULL, | 917 | free_roi (NULL, |
916 | &key, | 918 | &key, |
@@ -1032,7 +1034,6 @@ history_debit_cb (void *cls, | |||
1032 | { | 1034 | { |
1033 | struct WireAccount *wa = cls; | 1035 | struct WireAccount *wa = cls; |
1034 | struct ReserveOutInfo *roi; | 1036 | struct ReserveOutInfo *roi; |
1035 | struct GNUNET_HashCode rowh; | ||
1036 | 1037 | ||
1037 | if (TALER_BANK_DIRECTION_NONE == dir) | 1038 | if (TALER_BANK_DIRECTION_NONE == dir) |
1038 | { | 1039 | { |
@@ -1056,11 +1057,8 @@ history_debit_cb (void *cls, | |||
1056 | { | 1057 | { |
1057 | char *diagnostic; | 1058 | char *diagnostic; |
1058 | 1059 | ||
1059 | GNUNET_CRYPTO_hash (row_off, | ||
1060 | row_off_size, | ||
1061 | &rowh); | ||
1062 | GNUNET_asprintf (&diagnostic, | 1060 | GNUNET_asprintf (&diagnostic, |
1063 | "malformed subject `%8s...'", | 1061 | "malformed subject `%s'", |
1064 | details->wtid_s); | 1062 | details->wtid_s); |
1065 | GNUNET_break (GNUNET_OK == | 1063 | GNUNET_break (GNUNET_OK == |
1066 | TALER_amount_add (&total_wire_format_amount, | 1064 | TALER_amount_add (&total_wire_format_amount, |
@@ -1069,7 +1067,8 @@ history_debit_cb (void *cls, | |||
1069 | report (report_wire_format_inconsistencies, | 1067 | report (report_wire_format_inconsistencies, |
1070 | json_pack ("{s:o, s:o, s:s}", | 1068 | json_pack ("{s:o, s:o, s:s}", |
1071 | "amount", TALER_JSON_from_amount (&details->amount), | 1069 | "amount", TALER_JSON_from_amount (&details->amount), |
1072 | "wire_offset_hash", GNUNET_JSON_from_data_auto (&rowh), | 1070 | "wire_offset", GNUNET_JSON_from_data (row_off, |
1071 | row_off_size), | ||
1073 | "diagnostic", diagnostic)); | 1072 | "diagnostic", diagnostic)); |
1074 | GNUNET_free (diagnostic); | 1073 | GNUNET_free (diagnostic); |
1075 | return GNUNET_OK; | 1074 | return GNUNET_OK; |
@@ -1109,11 +1108,8 @@ history_debit_cb (void *cls, | |||
1109 | { | 1108 | { |
1110 | char *diagnostic; | 1109 | char *diagnostic; |
1111 | 1110 | ||
1112 | GNUNET_CRYPTO_hash (row_off, | ||
1113 | row_off_size, | ||
1114 | &rowh); | ||
1115 | GNUNET_asprintf (&diagnostic, | 1111 | GNUNET_asprintf (&diagnostic, |
1116 | "duplicate subject hash `%8s...'", | 1112 | "duplicate subject hash `%s'", |
1117 | TALER_B2S (&roi->subject_hash)); | 1113 | TALER_B2S (&roi->subject_hash)); |
1118 | GNUNET_break (GNUNET_OK == | 1114 | GNUNET_break (GNUNET_OK == |
1119 | TALER_amount_add (&total_wire_format_amount, | 1115 | TALER_amount_add (&total_wire_format_amount, |
@@ -1122,7 +1118,8 @@ history_debit_cb (void *cls, | |||
1122 | report (report_wire_format_inconsistencies, | 1118 | report (report_wire_format_inconsistencies, |
1123 | json_pack ("{s:o, s:o, s:s}", | 1119 | json_pack ("{s:o, s:o, s:s}", |
1124 | "amount", TALER_JSON_from_amount (&details->amount), | 1120 | "amount", TALER_JSON_from_amount (&details->amount), |
1125 | "wire_offset_hash", GNUNET_JSON_from_data_auto (&rowh), | 1121 | "wire_offset", GNUNET_JSON_from_data (row_off, |
1122 | row_off_size), | ||
1126 | "diagnostic", diagnostic)); | 1123 | "diagnostic", diagnostic)); |
1127 | GNUNET_free (diagnostic); | 1124 | GNUNET_free (diagnostic); |
1128 | return GNUNET_OK; | 1125 | return GNUNET_OK; |
@@ -1542,7 +1539,7 @@ history_credit_cb (void *cls, | |||
1542 | row_off_size), | 1539 | row_off_size), |
1543 | "diagnostic", "execution date missmatch")); | 1540 | "diagnostic", "execution date missmatch")); |
1544 | } | 1541 | } |
1545 | cleanup: | 1542 | cleanup: |
1546 | GNUNET_assert (GNUNET_OK == | 1543 | GNUNET_assert (GNUNET_OK == |
1547 | free_rii (NULL, | 1544 | free_rii (NULL, |
1548 | &key, | 1545 | &key, |