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:
1 parent
48567e8944
commit
cd14c52ecd
7 files changed
+45
-33
No files matched your search
@@ -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