htlcswitch: add quiescence timeout that is aborted by Resume

This commit is contained in:
Keagan McClelland
2024-11-11 16:33:50 -07:00
parent 111c9b05f3
commit a4c49a88f1
3 changed files with 124 additions and 0 deletions

View File

@@ -490,6 +490,10 @@ func NewChannelLink(cfg ChannelLinkConfig,
sendMsg: func(s lnwire.Stfu) error {
return cfg.Peer.SendMessage(false, &s)
},
timeoutDuration: defaultQuiescenceTimeout,
onTimeout: func() {
cfg.Peer.Disconnect(ErrQuiescenceTimeout)
},
})
} else {
qsm = &quiescerNoop{}