diff --git a/routing/blindedpath/blinded_path.go b/routing/blindedpath/blinded_path.go index 19a6edcaa..c03ae833c 100644 --- a/routing/blindedpath/blinded_path.go +++ b/routing/blindedpath/blinded_path.go @@ -82,7 +82,16 @@ type BuildBlindedPathCfg struct { MinFinalCLTVExpiryDelta uint32 // BlocksUntilExpiry is the number of blocks that this blinded path - // should remain valid for. + // should remain valid for. This is a relative number of blocks. This + // number in addition with a potential minimum cltv delta for the last + // hop and some block padding will be the payment constraint which is + // part of the blinded hop info. Every htlc using the provided blinded + // hops cannot have a higher cltv delta otherwise it will get rejected + // by the forwarding nodes or the final node. + // + // This number should at least be greater than the invoice expiry time + // so that the blinded route is always valid as long as the invoice is + // valid. BlocksUntilExpiry uint32 // MinNumHops is the minimum number of hops that each blinded path @@ -105,13 +114,6 @@ type BuildBlindedPathCfg struct { func BuildBlindedPaymentPaths(cfg *BuildBlindedPathCfg) ( []*zpay32.BlindedPaymentPath, error) { - if cfg.MinFinalCLTVExpiryDelta >= cfg.BlocksUntilExpiry { - return nil, fmt.Errorf("blinded path CLTV expiry delta (%d) "+ - "must be greater than the minimum final CLTV expiry "+ - "delta (%d)", cfg.BlocksUntilExpiry, - cfg.MinFinalCLTVExpiryDelta) - } - // Find some appropriate routes for the value to be routed. This will // return a set of routes made up of real nodes. routes, err := cfg.FindRoutes(cfg.ValueMsat)