mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-11 01:11:02 +02:00
htlcswitch: drop connection if link updates after stfu
This commit is contained in:
parent
44c87ef1d7
commit
6d30ab6c4f
@ -1979,6 +1979,13 @@ func (l *channelLink) cleanupSpuriousResponse(pkt *htlcPacket) {
|
|||||||
// updates from the upstream peer. The upstream peer is the peer whom we have a
|
// updates from the upstream peer. The upstream peer is the peer whom we have a
|
||||||
// direct channel with, updating our respective commitment chains.
|
// direct channel with, updating our respective commitment chains.
|
||||||
func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) {
|
func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) {
|
||||||
|
// First check if the message is an update and we are capable of
|
||||||
|
// receiving updates right now.
|
||||||
|
if msg.MsgType().IsChannelUpdate() && !l.quiescer.CanRecvUpdates() {
|
||||||
|
l.stfuFailf("update received after stfu: %T", msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
case *lnwire.UpdateAddHTLC:
|
case *lnwire.UpdateAddHTLC:
|
||||||
if l.IsFlushing(Incoming) {
|
if l.IsFlushing(Incoming) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user