mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
blindedpath: remove blockexpiry check.
Removes a check where we would NOT allow to create a blinded invoice with an expiry (invoice expiry in seconds considered as block time) lower than the min_final_ctlv_delta.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
dbe4ca3efe
commit
38c81516ec
@@ -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)
|
||||
|
Reference in New Issue
Block a user