core-lightning/tests
Rusty Russell e39fe41ff0 pytest: fix flake in penalty tests
Make sure we've completely processed htlc, so we will definitely consider it an old spend.  If we're too fast, l2 might consider it a legitimate unilateral close:

```
        # Make sure both sides got revoke_and_ack for final.
        l1.daemon.wait_for_log('peer_in WIRE_REVOKE_AND_ACK')
        l2.daemon.wait_for_log('peer_in WIRE_REVOKE_AND_ACK')
    
        # Now we really mess things up!
        bitcoind.rpc.sendrawtransaction(tx)
        bitcoind.generate_block(1)
    
        l2.daemon.wait_for_log(' to ONCHAIN')
        # FIXME: l1 should try to stumble along!
    
        # l2 should spend all of the outputs (except to-us).
        # Could happen in any order, depending on commitment tx.
        needle = l2.daemon.logsearch_start
        ((_, txid1, blocks1), (_, txid2, blocks2)) = \
>           l2.wait_for_onchaind_txs(('OUR_PENALTY_TX',
                                      'THEIR_REVOKED_UNILATERAL/DELAYED_CHEAT_OUTPUT_TO_THEM'),
                                     ('OUR_PENALTY_TX',
                                      'THEIR_REVOKED_UNILATERAL/OUR_HTLC'))

tests/test_closing.py:687: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
contrib/pyln-testing/pyln/testing/utils.py:1264: in wait_for_onchaind_txs
    r = self.daemon.wait_for_log('Telling lightningd about {} to resolve {}'
contrib/pyln-testing/pyln/testing/utils.py:346: in wait_for_log
    return self.wait_for_logs([regex], timeout)
```

You can see l2 here:

```
lightningd-2 2023-07-27T03:34:24.533Z DEBUG   0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-onchaind-chan#1: Their unilateral tx, old commit point
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-28 09:44:58 +09:30
..
data pytest: add test for db crash on conflicting invoice.id 2023-07-27 15:54:08 +09:30
fuzz fuzz: initial sha256 seeds 2023-07-10 14:56:50 +09:30
plugins pytest: test for bad estimatefees results. 2023-07-16 12:57:27 +09:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py tests: add marker for v1/v2 channel opens 2021-05-12 11:25:41 +09:30
db.py test-db-provider: if postgres in tests, startup a bookkeeper db 2022-07-28 12:08:18 +09:30
fixtures.py pyln.testing: remove Throttler. 2023-04-06 09:10:53 +09:30
rkls_github_canned_server.py pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
test_bookkeeper.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
test_cln_rs.py pyln: Create a dedicated pyln-grpc-proto package 2023-07-10 13:47:38 +09:30
test_closing.py pytest: fix flake in penalty tests 2023-07-28 09:44:58 +09:30
test_connection.py pytest: test for setchannel's new ignorefeelimits. 2023-07-22 13:11:08 +09:30
test_db.py wallet: fix up PSBTs as a migration. 2023-03-31 09:16:25 +10:30
test_gossip.py pytest: fix flake in test_gossip_store_compact_on_load. 2023-07-28 09:44:58 +09:30
test_invoices.py wallet: fix migration of existing invoices's id variable. 2023-07-27 15:54:08 +09:30
test_misc.py channeld: Verify the signature sent by the counterparty 2023-07-26 06:57:15 +09:30
test_mkfunding.py pytest: add tests for devtools/mkfunding 2023-01-09 14:50:30 -06:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py pytest: fix test_anchor_min_emergency "bad gossip" messages. 2023-07-22 08:52:55 +09:30
test_pay.py libplugin/pay: allow shortcut for self-pay. 2023-07-26 06:55:48 +09:30
test_plugin.py invoice: return error string from invoice_check_payment. 2023-07-26 06:55:48 +09:30
test_reckless.py pytest: add reckless local install test 2023-07-27 06:53:49 +09:30
test_runes.py lightningd: clean up commando rune_counter from datastore on migration. 2023-07-25 14:47:12 +09:30
test_wallet.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
utils.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30