summaryrefslogtreecommitdiff
path: root/contrib/auditor-report.tex.j2
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-21 16:09:22 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-21 16:09:22 +0100
commit88fd81e5da88fe11746ed7c06ba283891e05b673 (patch)
tree0816f19307abcf815e67763d8d461ca84819e016 /contrib/auditor-report.tex.j2
parenta8b8258e12f8e04936bffd82a2e31be7117ec860 (diff)
downloadexchange-88fd81e5da88fe11746ed7c06ba283891e05b673.tar.gz
exchange-88fd81e5da88fe11746ed7c06ba283891e05b673.tar.bz2
exchange-88fd81e5da88fe11746ed7c06ba283891e05b673.zip
completing auditor split
Diffstat (limited to 'contrib/auditor-report.tex.j2')
-rw-r--r--contrib/auditor-report.tex.j286
1 files changed, 77 insertions, 9 deletions
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 %}