mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:01:20 +02:00
routerrpc: use cltv delta default for buildroute.
This commit uses the default timelock delta (cltv delta) when no value is provided for the buildroute rpc cmd. Moreover it enhances the docs.
This commit is contained in:
@@ -999,6 +999,12 @@ func (s *Server) BuildRoute(ctx context.Context,
|
||||
payAddr = &backingPayAddr
|
||||
}
|
||||
|
||||
if req.FinalCltvDelta == 0 {
|
||||
req.FinalCltvDelta = int32(
|
||||
s.cfg.RouterBackend.DefaultFinalCltvDelta,
|
||||
)
|
||||
}
|
||||
|
||||
// Build the route and return it to the caller.
|
||||
route, err := s.cfg.Router.BuildRoute(
|
||||
amt, hops, outgoingChan, req.FinalCltvDelta, payAddr,
|
||||
|
Reference in New Issue
Block a user