Skip to content

Conversation

@moodyjon
Copy link
Contributor

Fixes #3713

Reproduction of something similar to the original problem:

(lbry-venv) swdev1@Jonathans-Mac-mini lbry-sdk % python -m unittest -vv -k test_liquidate_at_loss tests/unit/wallet/test_transaction.py 
test_liquidate_at_loss (tests.unit.wallet.test_transaction.TransactionIOBalancing) ... FAIL
test_liquidate_at_loss_tiny_utxos (tests.unit.wallet.test_transaction.TransactionIOBalancing) ... 2022-12-12 11:19:56,267 - root - ERROR - Failed to create transaction:
Traceback (most recent call last):
  File "/Users/swdev1/lbry-sdk/lbry/wallet/transaction.py", line 822, in create
    raise InsufficientFundsError()
lbry.error.InsufficientFundsError: Not enough funds to cover this transaction.
ok

======================================================================
FAIL: test_liquidate_at_loss (tests.unit.wallet.test_transaction.TransactionIOBalancing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/swdev1/lbry-sdk/lbry/testcase.py", line 145, in run
    self.loop.run_until_complete(maybe_coroutine)
  File "/usr/local/Cellar/[email protected]/3.7.13/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/Users/swdev1/lbry-sdk/tests/unit/wallet/test_transaction.py", line 549, in test_liquidate_at_loss
    self.assertListEqual([1100], [o.amount for o in tx.outputs])
AssertionError: Lists differ: [1100] != []

First list contains 1 additional elements.
First extra element 0:
1100

- [1100]
+ []

----------------------------------------------------------------------
Ran 2 tests in 1.295s

FAILED (failures=1)

@coveralls
Copy link

coveralls commented Dec 12, 2022

Coverage Status

Coverage decreased (-0.02%) to 56.623% when pulling bea2089 on moodyjon:zero_tx_outputs2 into 6258651 on lbryio:master.

@moodyjon moodyjon requested a review from eukreign December 14, 2022 14:58
@lbry-bot lbry-bot assigned eukreign and unassigned moodyjon Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

invalid transaction: 0 output tx created, fails to broadcast

3 participants