Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4806 from golemfactory/dont_unlock_empty_lock
Browse files Browse the repository at this point in the history
don't unlock if there's nothing left
  • Loading branch information
etam authored Oct 18, 2019
2 parents e06b697 + 91a9b49 commit ce07f67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions golem/ethereum/transactionsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ def lock_funds_for_payments(self, price: int, num: int) -> None:
(self._payments_locked + self._payment_processor.recipients_count)

def unlock_funds_for_payments(self, price: int, num: int) -> None:
if num == 0:
return
gnt = price * num
if gnt > self._gntb_locked:
raise Exception("Can't unlock {} GNT, locked: {}".format(
Expand Down

0 comments on commit ce07f67

Please # to comment.