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
2021-10-19 09:37:47 +02:00
parent 45de686d35
commit 990dda4b18
13 changed files with 81 additions and 39 deletions

View File

@@ -119,7 +119,7 @@ func TestBandwidthManager(t *testing.T) {
require.NoError(t, err)
bandwidth, found := m.availableChanBandwidth(
testCase.channelID,
testCase.channelID, 10,
)
require.Equal(t, testCase.expectedBandwidth, bandwidth)
require.Equal(t, testCase.expectFound, found)