zpay32: move HopHint and DefaultFinalCLTVDelta

This commit is contained in:
Joost Jager
2019-02-19 09:09:01 +01:00
parent 652ebb1652
commit 2be1051fb6
11 changed files with 70 additions and 66 deletions

View File

@@ -19,6 +19,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/zpay32"
)
// defaultNumRoutes is the default value for the maximum number of routes to
@@ -186,7 +187,7 @@ func TestFindRoutesFeeSorting(t *testing.T) {
routes, err := ctx.router.FindRoutes(
ctx.router.selfNode.PubKeyBytes,
target, paymentAmt, noRestrictions, defaultNumRoutes,
DefaultFinalCLTVDelta,
zpay32.DefaultFinalCLTVDelta,
)
if err != nil {
t.Fatalf("unable to find any routes: %v", err)
@@ -248,7 +249,7 @@ func TestFindRoutesWithFeeLimit(t *testing.T) {
routes, err := ctx.router.FindRoutes(
ctx.router.selfNode.PubKeyBytes,
target, paymentAmt, restrictions, defaultNumRoutes,
DefaultFinalCLTVDelta,
zpay32.DefaultFinalCLTVDelta,
)
if err != nil {
t.Fatalf("unable to find any routes: %v", err)
@@ -1345,7 +1346,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
routes, err := ctx.router.FindRoutes(
ctx.router.selfNode.PubKeyBytes,
targetPubKeyBytes, paymentAmt, noRestrictions, defaultNumRoutes,
DefaultFinalCLTVDelta,
zpay32.DefaultFinalCLTVDelta,
)
if err != nil {
t.Fatalf("unable to find any routes: %v", err)
@@ -1391,7 +1392,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
routes, err = ctx.router.FindRoutes(
ctx.router.selfNode.PubKeyBytes,
targetPubKeyBytes, paymentAmt, noRestrictions, defaultNumRoutes,
DefaultFinalCLTVDelta,
zpay32.DefaultFinalCLTVDelta,
)
if err != nil {
t.Fatalf("unable to find any routes: %v", err)