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 committed 2020-04-02 10:24:33 +02:00
1 parent f9eeb6b41f
commit 00903ef9f5
5 files changed
+44 -16

No files matched your search

+5 -1
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)
}