LBRY-Vault/electrum/tests
SomberNight 5fda2cbb42
fix test: test_reestablish_with_old_state
Messages sent as part of the payment were getting interleaved with the channel_reestablish.
It does not actually make sense to do a payment and then reestablish the channel in the same transport -- the channel is supposed to already have been reestablished to do a payment in the first place.
So, after payment, strip down the transport, and set up a new transport before reestablishing.

Traceback (most recent call last):
  File "...\Python\Python38\lib\unittest\case.py", line 60, in testPartExecutor
    yield
  File "...\Python\Python38\lib\unittest\case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "...\Python\Python38\lib\unittest\case.py", line 633, in _callTestMethod
    method()
  File "...\electrum\electrum\tests\test_lnpeer.py", line 262, in test_reestablish_with_old_state
    run(f())
  File "...\electrum\electrum\tests\test_lnpeer.py", line 302, in run
    return asyncio.run_coroutine_threadsafe(coro, loop=asyncio.get_event_loop()).result()
  File "...\Python\Python38\lib\concurrent\futures\_base.py", line 439, in result
    return self.__get_result()
  File "...\Python\Python38\lib\concurrent\futures\_base.py", line 388, in __get_result
    raise self._exception
  File "...\electrum\electrum\tests\test_lnpeer.py", line 260, in f
    await gath
  File "...\electrum\electrum\lnpeer.py", line 439, in _message_loop
    self.process_message(msg)
  File "...\electrum\electrum\lnpeer.py", line 159, in process_message
    execution_result = f(payload)
  File "...\electrum\electrum\lnpeer.py", line 1308, in on_revoke_and_ack
    chan.receive_revocation(rev)
  File "...\electrum\electrum\lnchannel.py", line 556, in receive_revocation
    raise Exception('revoked secret not for current point')
Exception: revoked secret not for current point
2020-02-24 21:09:34 +01:00
..
regtest regtest: wait_for_balance 2020-02-05 08:56:58 +01:00
__init__.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00
regtest.py regests: organize tests in two classes 2020-02-03 15:16:15 +01:00
test_bitcoin.py tests: rm "needs_test_with_all_ecc_implementations" decorator 2020-02-11 16:46:31 +01:00
test_blockchain.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00
test_bolt11.py fix tests: follow-up prev 2019-10-01 20:42:34 +02:00
test_coinchooser.py CoinChooser: avoid NotEnoughFunds if zero buckets are sufficient 2019-11-11 15:15:04 +01:00
test_commands.py Separate db from storage 2020-02-10 17:45:23 +01:00
test_dnssec.py tests: rm "needs_test_with_all_ecc_implementations" decorator 2020-02-11 16:46:31 +01:00
test_lnchannel.py Restructure wallet storage: 2020-02-04 13:35:58 +01:00
test_lnhtlc.py Restructure wallet storage: 2020-02-04 13:35:58 +01:00
test_lnpeer.py fix test: test_reestablish_with_old_state 2020-02-24 21:09:34 +01:00
test_lnrouter.py tests: fix test_find_path_for_payment. need to close sqlite connection 2019-09-22 21:21:24 +02:00
test_lntransport.py python 3.8: adapt to breaking changes re asyncio.CancelledError 2019-12-11 23:07:47 +01:00
test_lnutil.py lnutil.split_host_port: fix for IPv6 connection string 2020-02-17 19:43:21 +01:00
test_mnemonic.py old_mnemonic: speed up mn_decode 2019-11-15 12:08:06 +01:00
test_network.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00
test_psbt.py psbt: allow insecure signing of legacy UTXOs without full previous tx 2019-11-07 02:40:10 +01:00
test_revealer.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00
test_simple_config.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00
test_storage_upgrade.py Separate db from storage 2020-02-10 17:45:23 +01:00
test_transaction.py tests: rm "needs_test_with_all_ecc_implementations" decorator 2020-02-11 16:46:31 +01:00
test_util.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00
test_wallet.py Separate db from storage 2020-02-10 17:45:23 +01:00
test_wallet_vertical.py wallet: fix is_mine/can_sign. don't just rely on ks, also check script 2020-02-12 18:14:07 +01:00
test_x509.py config: no longer singleton. it is passed to Wallet.__init__ 2019-09-22 20:46:01 +02:00