mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
htlcswitch: implement noop quiescer
In this commit we implement a noop quiescer that we will use when the feature hasn't been negotiated. This will make it far easier to manage quiescence operations without having a number of if statements in the link logic.
This commit is contained in:
@@ -14,7 +14,7 @@ var cid = lnwire.ChannelID(bytes.Repeat([]byte{0x00}, 32))
|
||||
|
||||
type quiescerTestHarness struct {
|
||||
pendingUpdates lntypes.Dual[uint64]
|
||||
quiescer Quiescer
|
||||
quiescer *QuiescerLive
|
||||
conn <-chan lnwire.Stfu
|
||||
}
|
||||
|
||||
@@ -27,14 +27,16 @@ func initQuiescerTestHarness(
|
||||
conn: conn,
|
||||
}
|
||||
|
||||
harness.quiescer = NewQuiescer(QuiescerCfg{
|
||||
quiescer, _ := NewQuiescer(QuiescerCfg{
|
||||
chanID: cid,
|
||||
channelInitiator: channelInitiator,
|
||||
sendMsg: func(msg lnwire.Stfu) error {
|
||||
conn <- msg
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}).(*QuiescerLive)
|
||||
|
||||
harness.quiescer = quiescer
|
||||
|
||||
return harness
|
||||
}
|
||||
|
Reference in New Issue
Block a user