mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
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:
committed by
Oliver Gugger
parent
48567e8944
commit
cd14c52ecd
@@ -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
|
||||
|
Reference in New Issue
Block a user