pytest: further deflake test_funding_push.

I also got an error under CI; it seems the sleep() was insufficient.
So try adding a sleep inside the check_coin_moves, which should cover
everyone.

```
                acct_moves = acct_moves[number_moves:]
            else:
>               if not move_matches(m, acct_moves[0]):
E               IndexError: list index out of range
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-12-29 14:11:15 +10:30
parent ae4669f77f
commit b659fbbdf7
2 changed files with 14 additions and 2 deletions

View File

@@ -1077,8 +1077,6 @@ def test_funding_push(node_factory, bitcoind, chainparams):
assert funds['channel_sat'] + push_sat == funds['channel_total_sat']
chanid = first_channel_id(l2, l1)
# give the file write a second
time.sleep(1)
channel_mvts_1 = [
{'type': 'chain_mvt', 'credit': 16777215000, 'debit': 0, 'tags': ['channel_open', 'opener']},
{'type': 'channel_mvt', 'credit': 0, 'debit': 20000000, 'tags': ['pushed'], 'fees': '0msat'},