From f08e7fe0d6c123d42ea6b66609daf0c2b2640cc3 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 26 Mar 2025 16:35:30 -0700 Subject: [PATCH] lnwallet/chancloser: fix flake in TestRbfChannelFlushingTransitions/early_offer In this commit, we fix a flake in the `TestRbfChannelFlushingTransitions/early_offer` test. The fix is simple: this is actually an "iteration", as we have a self transition to the ChannelNegotiation state first. We also don't need to send the remoteOffer, so we set `sendInit` to false. The offer still needs to be passed in to ensure that the assertions work however. --- lnwallet/chancloser/rbf_coop_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnwallet/chancloser/rbf_coop_test.go b/lnwallet/chancloser/rbf_coop_test.go index 33da8b2c3..ab2526e77 100644 --- a/lnwallet/chancloser/rbf_coop_test.go +++ b/lnwallet/chancloser/rbf_coop_test.go @@ -1353,8 +1353,8 @@ func TestRbfChannelFlushingTransitions(t *testing.T) { // offer and send our sig). closeHarness.chanCloser.SendEvent(ctx, &flushEvent) closeHarness.assertSingleRemoteRbfIteration( - remoteOffer, absoluteFee, absoluteFee, sequence, false, - true, + remoteOffer, absoluteFee, absoluteFee, sequence, true, + false, ) })