diff --git a/lnwallet/chancloser/rbf_coop_test.go b/lnwallet/chancloser/rbf_coop_test.go index 0f2b6055d..485aef17b 100644 --- a/lnwallet/chancloser/rbf_coop_test.go +++ b/lnwallet/chancloser/rbf_coop_test.go @@ -825,10 +825,13 @@ func newRbfCloserTestHarness(t *testing.T, ).Return(nil) chanCloser := protofsm.NewStateMachine(protoCfg) - chanCloser.Start(ctx) + // We register our subscriber before starting the state machine, to make + // sure we don't miss any events. harness.stateSub = chanCloser.RegisterStateEvents() + chanCloser.Start(ctx) + harness.chanCloser = &chanCloser return harness