Merge pull request #142 from lbryio/skip-dust

skip dust transactions
This commit is contained in:
Jack Robison 2016-08-30 20:29:56 -04:00 committed by GitHub
commit 9c66108dc5

View file

@ -279,11 +279,16 @@ class LBRYWallet(object):
def _send_payments(self):
payments_to_send = {}
for address, points in self.queued_payments.items():
log.info("Should be sending %s points to %s", str(points), str(address))
payments_to_send[address] = points
self.total_reserved_points -= points
self.wallet_balance -= points
if points > 0:
log.info("Should be sending %s points to %s", str(points), str(address))
payments_to_send[address] = points
self.total_reserved_points -= points
self.wallet_balance -= points
else:
log.info("Skipping dust")
del self.queued_payments[address]
if payments_to_send:
log.info("Creating a transaction with outputs %s", str(payments_to_send))
d = self._do_send_many(payments_to_send)