Skip to content

Commit

Permalink
rpc: use more sensible final cltv delta default when sending payments
Browse files Browse the repository at this point in the history
  • Loading branch information
joostjager committed Jan 10, 2020
1 parent 59a7a9d commit d3fa976
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,11 @@ func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPayme
if rpcPayReq.FinalCltvDelta != 0 {
payIntent.cltvDelta = uint16(rpcPayReq.FinalCltvDelta)
} else {
payIntent.cltvDelta = zpay32.DefaultFinalCLTVDelta
// If no final cltv delta is given, assume the default that we
// use when creating an invoice. We do not assume the default of
// 9 blocks that is defined in BOLT-11, because this is never
// enough for other lnd nodes.
payIntent.cltvDelta = uint16(cfg.Bitcoin.TimeLockDelta)
}

// If the user is manually specifying payment details, then the payment
Expand Down

0 comments on commit d3fa976

Please sign in to comment.