From de48441901dde4b22d2e52364b460a93f3d80fca Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 20 Apr 2020 15:35:03 -0400 Subject: [PATCH] Slightly fixed TODO comment --- src/_zkapauthorizer/controller.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/_zkapauthorizer/controller.py b/src/_zkapauthorizer/controller.py index 83374c1..5768b34 100644 --- a/src/_zkapauthorizer/controller.py +++ b/src/_zkapauthorizer/controller.py @@ -706,7 +706,12 @@ class PaymentController(object): if num_tokens is None: num_tokens = self.default_token_count tokens = self._get_random_tokens_for_voucher(voucher, num_tokens) - # TODO: Actually count up from 0 to maxCounter instead of only passing 0 here. + # TODO: Actually count up from the voucher's current counter value to + # maxCounter instead of only passing 0 here. Starting at 0 is fine + # for a new voucher but if we partially redeemed a voucher on a + # previous run and this call comes from `_check_pending_vouchers` then + # we should skip any already-redeemed counter values. + # # https://github.com/PrivateStorageio/ZKAPAuthorizer/issues/124 return self._perform_redeem(voucher, 0, tokens) -- GitLab