peer: send taproot addrs during co-op close based on new feature bit

If the ShutdownAnySegwitOptional option is active, then we can safely
send these newer addresses.
This commit is contained in:
Olaoluwa Osuntokun committed 2022-08-10 18:44:35 -07:00
1 parent 99d37f254e
commit fffad49ad1
3 files changed
+28 -11

No files matched your search

+6
View File
@@ -55,6 +55,8 @@ func TestPeerChannelClosureAcceptFeeResponder(t *testing.T) {
mockLink := newMockUpdateHandler(chanID)
mockSwitch.links = append(mockSwitch.links, mockLink)
dummyDeliveryScript := genScript(t, p2wshAddress)
// We send a shutdown request to Alice. She will now be the responding
// node in this shutdown procedure. We first expect Alice to answer
// this shutdown request with a Shutdown message.
@@ -156,6 +158,8 @@ func TestPeerChannelClosureAcceptFeeInitiator(t *testing.T) {
mockLink := newMockUpdateHandler(chanID)
mockSwitch.links = append(mockSwitch.links, mockLink)
dummyDeliveryScript := genScript(t, p2wshAddress)
// We make Alice send a shutdown request.
updateChan := make(chan interface{}, 1)
errChan := make(chan error, 1)
@@ -281,6 +285,7 @@ func TestPeerChannelClosureFeeNegotiationsResponder(t *testing.T) {
// Bob sends a shutdown request to Alice. She will now be the responding
// node in this shutdown procedure. We first expect Alice to answer this
// Shutdown request with a Shutdown message.
dummyDeliveryScript := genScript(t, p2wshAddress)
alicePeer.chanCloseMsgs <- &closeMsg{
cid: chanID,
msg: lnwire.NewShutdown(chanID,
@@ -492,6 +497,7 @@ func TestPeerChannelClosureFeeNegotiationsInitiator(t *testing.T) {
aliceDeliveryScript := shutdownMsg.Address
// Bob will answer the Shutdown message with his own Shutdown.
dummyDeliveryScript := genScript(t, p2wshAddress)
respShutdown := lnwire.NewShutdown(chanID, dummyDeliveryScript)
alicePeer.chanCloseMsgs <- &closeMsg{
cid: chanID,