Commit graph

3 commits

Author SHA1 Message Date
Leonard Lyubich
a6a5a84f36 [#326] settlement/audit: Prevent negative amount arguments of Exchanger
Do not pass zero transfers from the calculation table to Exchanger. Revert
transfers with negative amount since Exchanger interface requires positive
amounts of funds.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00
Leonard Lyubich
2bca5879cd [#326] ir/settlement: Move the calculation of the minimum audit fee
Move control of the minimum cost of payment for the audit from the
implementation of the Exchanger to the place where the amount is calculated.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00
Leonard Lyubich
685b593af3 [#326] ir/settlement: Implement calculator of settlements for audit
Implement component that analyzes audit results and generates transactions
for payment of awards for successfully passed audit. When calculating the
total fee, the declared price of the node (attribute) and the total volume
of storage groups, which were successfully audited by the container, are
taken into account. In one call the calculator processes all audit results
for the previous epoch (relative to the calculated parameter).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00