multi: surface may add outgoing hltc
This commit is contained in:
4 files changed
+38
No files matched your search
@@ -145,6 +145,10 @@ type ChannelLink interface {
|
||||
// will use this function in forwarding decisions accordingly.
|
||||
EligibleToForward() bool
|
||||
|
||||
// MayAddOutgoingHtlc returns an error if we may not add an outgoing
|
||||
// htlc to the channel.
|
||||
MayAddOutgoingHtlc() error
|
||||
|
||||
// AttachMailBox delivers an active MailBox to the link. The MailBox may
|
||||
// have buffered messages.
|
||||
AttachMailBox(MailBox)
|
||||
|
||||
@@ -2156,6 +2156,12 @@ func (l *channelLink) Bandwidth() lnwire.MilliSatoshi {
|
||||
return l.channel.AvailableBalance()
|
||||
}
|
||||
|
||||
// MayAddOutgoingHtlc indicates whether we may add any more outgoing htlcs to
|
||||
// this channel.
|
||||
func (l *channelLink) MayAddOutgoingHtlc() error {
|
||||
return l.channel.MayAddOutgoingHtlc()
|
||||
}
|
||||
|
||||
// AttachMailBox updates the current mailbox used by this link, and hooks up
|
||||
// the mailbox's message and packet outboxes to the link's upstream and
|
||||
// downstream chans, respectively.
|
||||
|
||||
@@ -756,6 +756,7 @@ func (f *mockChannelLink) Peer() lnpeer.Peer { return
|
||||
func (f *mockChannelLink) ChannelPoint() *wire.OutPoint { return &wire.OutPoint{} }
|
||||
func (f *mockChannelLink) Stop() {}
|
||||
func (f *mockChannelLink) EligibleToForward() bool { return f.eligible }
|
||||
func (f *mockChannelLink) MayAddOutgoingHtlc() error { return nil }
|
||||
func (f *mockChannelLink) setLiveShortChanID(sid lnwire.ShortChannelID) { f.shortChanID = sid }
|
||||
func (f *mockChannelLink) UpdateShortChanID() (lnwire.ShortChannelID, error) {
|
||||
f.eligible = true
|
||||
|
||||
Reference in new issue
Block a user