diff --git a/docs/release-notes/release-notes-0.22.0.md b/docs/release-notes/release-notes-0.22.0.md index 750a20069c..10757e1601 100644 --- a/docs/release-notes/release-notes-0.22.0.md +++ b/docs/release-notes/release-notes-0.22.0.md @@ -136,6 +136,15 @@ ## Testing +* [Fixed an invalid delivery-script fixture in the RBF cooperative close + tests](https://github.com/lightningnetwork/lnd/pull/11042). + `TestRbfChannelActiveTransitions` shadowed the package-level delivery + addresses with byte blobs that are not well-formed shutdown scripts. The + subtests using them all tripped an earlier guard in `validateShutdown`, so the + bad fixture was never reached and nothing failed — but reordering those guards + would have panicked the package's test binary from inside the mock error + reporter, far from the fixture actually at fault. + ## Database ## Code Health diff --git a/lnwallet/chancloser/rbf_coop_test.go b/lnwallet/chancloser/rbf_coop_test.go index e3f0e88e8c..808c0494f4 100644 --- a/lnwallet/chancloser/rbf_coop_test.go +++ b/lnwallet/chancloser/rbf_coop_test.go @@ -32,6 +32,10 @@ import ( "github.com/stretchr/testify/require" ) +// Both of these must stay well-formed delivery scripts (they're P2TR here). +// Tests that drive a shutdown all the way through validateShutdown depend on +// them clearing the delivery-script check, and tests that target an earlier +// guard depend on the script not being what fails. var ( localAddr = lnwire.DeliveryAddress(append( []byte{txscript.OP_1, txscript.OP_DATA_32}, @@ -1369,8 +1373,6 @@ func testRemoteInitiatedCloseOkTaproot(t *testing.T, ctx context.Context) { // ChannelActive state. func TestRbfChannelActiveTransitions(t *testing.T) { ctx := t.Context() - localAddr := lnwire.DeliveryAddress(bytes.Repeat([]byte{0x01}, 20)) - remoteAddr := lnwire.DeliveryAddress(bytes.Repeat([]byte{0x02}, 20)) feeRate := chainfee.SatPerVByte(1000)