Skip to content

tests: fix test_rbf_non_last_mined flake - #9501

Merged
daywalker90 merged 1 commit into
ElementsProject:masterfrom
daywalker90:fix-test_rbf_non_last_mined-flake
Sep 18, 2026
Merged

daywalker90 merged 1 commit into
ElementsProject:masterfrom
daywalker90:fix-test_rbf_non_last_mined-flake

Conversation

@daywalker90

Copy link
Copy Markdown
Collaborator
        # The funding transaction gets mined (should be the 2nd inflight)
        bitcoind.generate_block(6, wait_for_mempool=1)

        # l2 comes back up
        l2.start()

        # everybody's got the right things now
        l1.daemon.wait_for_log(r'to CHANNELD_NORMAL')
        l2.daemon.wait_for_log(r'to CHANNELD_NORMAL')

        channel = only_one(l1.rpc.listpeerchannels()['channels'])
>       assert channel['funding_txid'] == inflights[1]['funding_txid']
E       AssertionError: assert '12f2577bf10d40dd85e2de4ea867b59145fdcad541e861cf5993fbc5428b3aa7' == '1b8c5be4b21f8b741202cc2fcb1eb4ee0d529196870cfdeea03b1e69f88b436d'
E
E         - 1b8c5be4b21f8b741202cc2fcb1eb4ee0d529196870cfdeea03b1e69f88b436d
E         + 12f2577bf10d40dd85e2de4ea867b59145fdcad541e861cf5993fbc5428b3aa7

tests/test_opening.py:1448: AssertionError

Changelog-None

Fixes: #9476

Andezion
Andezion previously approved these changes Sep 17, 2026

@Andezion Andezion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason last1/last2 weren't captured for test_rbf_reconnect_non_last_mined at the exact same point as the first hunk (right after run_retry(), before openchannel_signed)?

```
        # The funding transaction gets mined (should be the 2nd inflight)
        bitcoind.generate_block(6, wait_for_mempool=1)

        # l2 comes back up
        l2.start()

        # everybody's got the right things now
        l1.daemon.wait_for_log(r'to CHANNELD_NORMAL')
        l2.daemon.wait_for_log(r'to CHANNELD_NORMAL')

        channel = only_one(l1.rpc.listpeerchannels()['channels'])
>       assert channel['funding_txid'] == inflights[1]['funding_txid']
E       AssertionError: assert '12f2577bf10d40dd85e2de4ea867b59145fdcad541e861cf5993fbc5428b3aa7' == '1b8c5be4b21f8b741202cc2fcb1eb4ee0d529196870cfdeea03b1e69f88b436d'
E
E         - 1b8c5be4b21f8b741202cc2fcb1eb4ee0d529196870cfdeea03b1e69f88b436d
E         + 12f2577bf10d40dd85e2de4ea867b59145fdcad541e861cf5993fbc5428b3aa7

tests/test_opening.py:1448: AssertionError
```

Changelog-None
@daywalker90

Copy link
Copy Markdown
Collaborator Author

They are/were at the same point though, am i blind? But the fix was still incomplete: len(daemon.logs) doesn't read new output. logs is only appended by logs_catchup(), which is called from is_in_log/wait_for_log. At the snapshot point the tailer is stale. Fix: call logs_catchup() on both daemons before snapshotting.

@Andezion Andezion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!!

@daywalker90
daywalker90 enabled auto-merge (rebase) September 18, 2026 15:46
@daywalker90
daywalker90 merged commit 72fa1a6 into ElementsProject:master Sep 18, 2026
86 of 89 checks passed
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.

CI flake test_rbf_non_last_mined

2 participants