diff --git a/tests/test_closing.py b/tests/test_closing.py index c1c354da75dd..0494a2a026b0 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -3919,7 +3919,7 @@ def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams): psbt = l2.rpc.addpsbtoutput(OUTPUT_SAT, psbt)['psbt'] l2.rpc.sendpsbt(l2.rpc.signpsbt(psbt)['signed_psbt']) bitcoind.generate_block(1, wait_for_mempool=1) - sync_blockheight(bitcoind, [l2]) + sync_blockheight(bitcoind, [l1, l2]) # Make sure all amounts are below OUTPUT_SAT sats! assert [x for x in l2.rpc.listfunds()['outputs'] if x['amount_msat'] > Millisatoshi(str(OUTPUT_SAT) + "sat")] == [] @@ -3931,6 +3931,9 @@ def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams): l1.rpc.sendpay(route, sticky_inv['payment_hash'], payment_secret=sticky_inv['payment_secret']) l3.daemon.wait_for_log('dev_disconnect: -WIRE_UPDATE_FULFILL_HTLC') + # Make sure HTLC expiry is what we expect! + l2.daemon.wait_for_log('Adding HTLC 0 amount=100000000msat cltv=119 gave CHANNEL_ERR_ADD_OK') + # l3 drops to chain, but make sure it doesn't CPFP its own anchor. wait_for(lambda: only_one(l3.rpc.listpeerchannels(l2.info['id'])['channels'])['htlcs'] != []) closetx = l3.rpc.dev_sign_last_tx(l2.info['id'])['tx'] diff --git a/tests/test_misc.py b/tests/test_misc.py index 163f06e2b85d..b5faa873d634 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -2687,7 +2687,7 @@ def test_custommsg_triggers_notification(node_factory): # Connect l1 to l2 l1.connect(l2) - wait_for(lambda: l2.rpc.listpeers(l1.info['id'])['peers'][0]['connected']) + wait_for(lambda: [p['connected'] for p in l2.rpc.listpeers(l1.info['id'])['peers']] == [True]) # Send a custommsg from l2 to l1 # The message id 7777 is chosen to be sufficiently high and shouldn't be used by the