htlcswitch: pass quit chans as unidirectional

This is a requirement for replacing the quit channel with a Context.
The Done() channel of a Context is always recv-only, so all users of
that channel must not expect a bidirectional channel.
This commit is contained in:
Jonathan Harvey-Buschel
2024-10-17 13:38:31 +02:00
committed by Oliver Gugger
parent 48567e8944
commit cd14c52ecd
7 changed files with 45 additions and 33 deletions

View File

@@ -250,7 +250,7 @@ func newMailboxContext(t *testing.T, startTime time.Time,
return ctx
}
func (c *mailboxContext) forward(_ chan struct{},
func (c *mailboxContext) forward(_ <-chan struct{},
pkts ...*htlcPacket) error {
for _, pkt := range pkts {
@@ -706,7 +706,7 @@ func TestMailOrchestrator(t *testing.T) {
// First, we'll create a new instance of our orchestrator.
mo := newMailOrchestrator(&mailOrchConfig{
failMailboxUpdate: failMailboxUpdate,
forwardPackets: func(_ chan struct{},
forwardPackets: func(_ <-chan struct{},
pkts ...*htlcPacket) error {
return nil