From 88fd81e5da88fe11746ed7c06ba283891e05b673 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 21 Mar 2020 16:09:22 +0100 Subject: completing auditor split --- contrib/auditor-report.tex.j2 | 86 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 9 deletions(-) (limited to 'contrib/auditor-report.tex.j2') diff --git a/contrib/auditor-report.tex.j2 b/contrib/auditor-report.tex.j2 index ccb249dd3..d826de446 100644 --- a/contrib/auditor-report.tex.j2 +++ b/contrib/auditor-report.tex.j2 @@ -467,9 +467,49 @@ the financial damage done to the customer). Note that the deltas only sum up the issues where $P \not= 0$ as only then we can tell if the problem lead to a profit or loss. +The {\bf P} colum is set to "1" if the arithmetic problem was be determined to be +profitable for the exchange, "-1" if the problem resulted in a net loss for +the exchange, and "0" if this is unclear or at least the gain/loss is not +easily determined from the amounts and thus not included in the totals. + +\subsubsection{For aggregation} + +% Table generation tested by testcase #XX in test-auditor.sh + +{% if aggregation.amount_arithmetic_inconsistencies|length() == 0 %} + {\bf No arithmetic problems detected.} +{% else %} + \begin{longtable}{p{3.5cm}|r|r|r|c} + {\bf Operation} & {\bf Row} & {\bf Exchange} & {\bf Auditor} & {\bf P} \\ + \hline \hline +\endfirsthead + {\bf Operation} & {\bf Row} & {\bf Exchange} & {\bf Auditor} & {\bf P} \\ \hline \hline +\endhead + \hline \hline + {\bf Operation} & {\bf Row} & {\bf Exchange} & {\bf Auditor} & {\bf P} \\ +\endfoot + \hline \hline + \multicolumn{2}{l|}{ {\bf $\sum$ Deltas (Auditor-Exchange)} } & + + {{ aggregation.total_arithmetic_delta_plus }} & + - {{ aggregation.total_arithmetic_delta_minus }} & \\ + \caption{Arithmetic inconsistencies.} + \label{table:amount:arithmetic:inconsistencies:aggregation} +\endlastfoot +{% for item in aggregation.amount_arithmetic_inconsistencies %} + \truncate{3.3cm}{ {\tiny {{ item.operation }} } } & + {{ item.rowid }} & + {{ item.exchange }} & + {{ item.auditor }} & + {{ item.profitable }} \\ \hline +{% endfor %} + \end{longtable} +{% endif %} + +\subsubsection{For coins} + % Table generation tested by testcase #18 in test-auditor.sh -{% if data.amount_arithmetic_inconsistencies|length() == 0 %} +{% if coins.amount_arithmetic_inconsistencies|length() == 0 %} {\bf No arithmetic problems detected.} {% else %} \begin{longtable}{p{3.5cm}|r|r|r|c} @@ -483,12 +523,12 @@ then we can tell if the problem lead to a profit or loss. \endfoot \hline \hline \multicolumn{2}{l|}{ {\bf $\sum$ Deltas (Auditor-Exchange)} } & - + {{ data.total_arithmetic_delta_plus }} & - - {{ data.total_arithmetic_delta_minus }} & \\ + + {{ coins.total_arithmetic_delta_plus }} & + - {{ coins.total_arithmetic_delta_minus }} & \\ \caption{Arithmetic inconsistencies.} - \label{table:amount:arithmetic:inconsistencies} + \label{table:amount:arithmetic:inconsistencies:coins} \endlastfoot -{% for item in data.amount_arithmetic_inconsistencies %} +{% for item in coins.amount_arithmetic_inconsistencies %} \truncate{3.3cm}{ {\tiny {{ item.operation }} } } & {{ item.rowid }} & {{ item.exchange }} & @@ -496,11 +536,39 @@ then we can tell if the problem lead to a profit or loss. {{ item.profitable }} \\ \hline {% endfor %} \end{longtable} +{% endif %} -The {\bf P} colum is set to "1" if the arithmetic problem was be determined to be -profitable for the exchange, "-1" if the problem resulted in a net loss for -the exchange, and "0" if this is unclear or at least the gain/loss is not -easily determined from the amounts and thus not included in the totals. +\subsubsection{For reserves} + +% Table generation tested by testcase #XX in test-auditor.sh + +{% if reserves.amount_arithmetic_inconsistencies|length() == 0 %} + {\bf No arithmetic problems detected.} +{% else %} + \begin{longtable}{p{3.5cm}|r|r|r|c} + {\bf Operation} & {\bf Row} & {\bf Exchange} & {\bf Auditor} & {\bf P} \\ + \hline \hline +\endfirsthead + {\bf Operation} & {\bf Row} & {\bf Exchange} & {\bf Auditor} & {\bf P} \\ \hline \hline +\endhead + \hline \hline + {\bf Operation} & {\bf Row} & {\bf Exchange} & {\bf Auditor} & {\bf P} \\ +\endfoot + \hline \hline + \multicolumn{2}{l|}{ {\bf $\sum$ Deltas (Auditor-Exchange)} } & + + {{ reserves.total_arithmetic_delta_plus }} & + - {{ reserves.total_arithmetic_delta_minus }} & \\ + \caption{Arithmetic inconsistencies.} + \label{table:amount:arithmetic:inconsistencies:reserves} +\endlastfoot +{% for item in reserves.amount_arithmetic_inconsistencies %} + \truncate{3.3cm}{ {\tiny {{ item.operation }} } } & + {{ item.rowid }} & + {{ item.exchange }} & + {{ item.auditor }} & + {{ item.profitable }} \\ \hline +{% endfor %} + \end{longtable} {% endif %} -- cgit v1.2.3