routing: add time_pref parameter to queryroutes and sendpayment

This commit is contained in:
Joost Jager
2021-11-23 12:06:33 +01:00
parent 269a8e74d3
commit ba5abdc090
17 changed files with 2034 additions and 1918 deletions

View File

@@ -268,7 +268,7 @@ func TestFindRoutesWithFeeLimit(t *testing.T) {
route, err := ctx.router.FindRoute(
ctx.router.selfNode.PubKeyBytes,
target, paymentAmt, restrictions, nil, nil,
target, paymentAmt, 0, restrictions, nil, nil,
MinCLTVDelta,
)
require.NoError(t, err, "unable to find any routes")
@@ -1525,7 +1525,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
copy(targetPubKeyBytes[:], targetNode.SerializeCompressed())
_, err = ctx.router.FindRoute(
ctx.router.selfNode.PubKeyBytes,
targetPubKeyBytes, paymentAmt, noRestrictions, nil, nil,
targetPubKeyBytes, paymentAmt, 0, noRestrictions, nil, nil,
MinCLTVDelta,
)
if err != nil {
@@ -1568,7 +1568,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
// updated.
_, err = ctx.router.FindRoute(
ctx.router.selfNode.PubKeyBytes,
targetPubKeyBytes, paymentAmt, noRestrictions, nil, nil,
targetPubKeyBytes, paymentAmt, 0, noRestrictions, nil, nil,
MinCLTVDelta,
)
if err != nil {
@@ -2465,7 +2465,7 @@ func TestFindPathFeeWeighting(t *testing.T) {
ctx.graph, nil, &mockBandwidthHints{},
noRestrictions,
testPathFindingConfig,
sourceNode.PubKeyBytes, target, amt, 0,
sourceNode.PubKeyBytes, target, amt, 0, 0,
)
if err != nil {
t.Fatalf("unable to find path: %v", err)