From 15d8f963ce468befef101a968bc1d458877e5cc3 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 18 Jul 2025 14:02:08 +0200 Subject: [PATCH] chancloser: fix error tests These tests previously only worked because we didn't properly wait for all transitions to come in. We fix them by correctly asserting the expected number of state transitions. --- lnwallet/chancloser/rbf_coop_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lnwallet/chancloser/rbf_coop_test.go b/lnwallet/chancloser/rbf_coop_test.go index 516d69b33..0f2b6055d 100644 --- a/lnwallet/chancloser/rbf_coop_test.go +++ b/lnwallet/chancloser/rbf_coop_test.go @@ -2003,12 +2003,7 @@ func TestRbfCloseErr(t *testing.T) { // initiate a new local sig). closeHarness.assertSingleRbfIteration( localOffer, balanceAfterClose, absoluteFee, - noDustExpect, false, - ) - - // We should terminate in the negotiation state. - closeHarness.assertStateTransitions( - &ClosingNegotiation{}, + noDustExpect, true, ) }) @@ -2050,7 +2045,7 @@ func TestRbfCloseErr(t *testing.T) { // sig. closeHarness.assertSingleRemoteRbfIteration( feeOffer, balanceAfterClose, absoluteFee, sequence, - false, true, + true, true, ) })