multi: thread bandwidth check amount down to MayAddOutgoingHtlc

Pass htlc amount down to the channel so that we don't need to rely
on minHtlc (and pad it when the channel sets a 0 min htlc). Update
test to just check some sane values since we're no longer relying
on minHtlc amount at all.
This commit is contained in:
carla committed 2021-10-19 09:50:51 +02:00
1 parent 45de686d35
commit 990dda4b18
13 files changed
+81 -39

No files matched your search

+3 -2
View File
@@ -102,8 +102,9 @@ type ChannelUpdateHandler interface {
EligibleToForward() bool
// MayAddOutgoingHtlc returns an error if we may not add an outgoing
// htlc to the channel.
MayAddOutgoingHtlc() error
// htlc to the channel, taking the amount of the htlc to add as a
// parameter.
MayAddOutgoingHtlc(lnwire.MilliSatoshi) error
// ShutdownIfChannelClean shuts the link down if the channel state is
// clean. This can be used with dynamic commitment negotiation or coop