multi: link quit can interrupt commitment signing

In this commit, we make sig job handling when singing a next commitment
non-blocking by allowing the shutdown of a channel link to prevent
further waiting on sig jobs by the channel state machine. This addresses
possible cases where the aux signer may be shut down via a separate quit
signal, so the state machine could block indefinitely on receiving an
update on a sig job.
This commit is contained in:
Jonathan Harvey-Buschel
2024-10-17 13:38:34 +02:00
committed by Oliver Gugger
parent 6edd942c70
commit 77ae7afe78
9 changed files with 256 additions and 177 deletions

View File

@@ -357,7 +357,7 @@ func testVectors(t *testing.T, chanType channeldb.ChannelType, test testCase) {
// Execute commit dance to arrive at the point where the local node has
// received the test commitment and the remote signature.
localNewCommit, err := localChannel.SignNextCommitment()
localNewCommit, err := localChannel.SignNextCommitment(ctxb)
require.NoError(t, err, "local unable to sign commitment")
err = remoteChannel.ReceiveNewCommitment(localNewCommit.CommitSigs)
@@ -369,7 +369,7 @@ func testVectors(t *testing.T, chanType channeldb.ChannelType, test testCase) {
_, _, err = localChannel.ReceiveRevocation(revMsg)
require.NoError(t, err)
remoteNewCommit, err := remoteChannel.SignNextCommitment()
remoteNewCommit, err := remoteChannel.SignNextCommitment(ctxb)
require.NoError(t, err)
require.Equal(