routing/payment_session: make RequestRoute take max amt, fee limit and

active shards

In preparation for doing pathfinding for routes sending a value less
than the total payment amount, we let the payment session take the max
amount to send and the fee limit as arguments to RequestRoute.
This commit is contained in:
Johan T. Halseth
2020-04-01 00:13:22 +02:00
parent f9eeb6b41f
commit 00903ef9f5
5 changed files with 44 additions and 16 deletions

View File

@ -50,6 +50,8 @@ func TestRequestRoute(t *testing.T) {
payment := &LightningPayment{
CltvLimit: cltvLimit,
FinalCLTVDelta: finalCltvDelta,
Amount: 1000,
FeeLimit: 1000,
}
session := &paymentSession{
@ -63,7 +65,9 @@ func TestRequestRoute(t *testing.T) {
pathFinder: findPath,
}
route, err := session.RequestRoute(height)
route, err := session.RequestRoute(
payment.Amount, payment.FeeLimit, 0, height,
)
if err != nil {
t.Fatal(err)
}