diff --git a/src/_zkapauthorizer/_storage_server.py b/src/_zkapauthorizer/_storage_server.py index f737e741eff646af375df8fb18c949e545cb24d7..5352d0a6cb696e36a70b1755ca0a8ddb0a778799 100644 --- a/src/_zkapauthorizer/_storage_server.py +++ b/src/_zkapauthorizer/_storage_server.py @@ -387,8 +387,17 @@ class ZKAPAuthorizerStorageServer(Referenceable): renew_leases=False, ) - # Add the lease that we charged the client for: leases on all written - # shares without an unexpired lease. + # Add the leases that we charged the client for. This includes: + # + # - leases on newly created shares + # + # - leases on existing, modified shares without an unexpired lease + # + # Note it does not include existing shares that grew enough to be more + # expensive. The operation was required to pay the full price + # difference but this only grants storage for the remainder of the + # existing lease period. This results in the client being overcharged + # somewhat. add_leases_for_writev(self._original, storage_index, secrets, tw_vectors, now) # Propagate the result of the operation.