mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 22:24:21 +01:00
peer+lnwire: add LinkUpdater iface and impl on relevant msgs
Removes longstanding TODO to simplify parsing of target chanid.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package lnwire
|
||||
|
||||
import "io"
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// CommitSig is sent by either side to stage any pending HTLC's in the
|
||||
// receiver's pending set into a new commitment state. Implicitly, the new
|
||||
@@ -83,3 +85,11 @@ func (c *CommitSig) MaxPayloadLength(uint32) uint32 {
|
||||
// 32 + 64 + 2 + max_allowed_htlcs
|
||||
return MaxMessagePayload
|
||||
}
|
||||
|
||||
// TargetChanID returns the channel id of the link for which this message is
|
||||
// intended.
|
||||
//
|
||||
// NOTE: Part of lnd.LinkUpdater interface.
|
||||
func (c *CommitSig) TargetChanID() ChannelID {
|
||||
return c.ChanID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user