routing+routerrpc: take max cltv limit into account within path finding
With the introduction of the max CLTV limit parameter, nodes are able to reject HTLCs that exceed it. This should also be applied to path finding, otherwise HTLCs crafted by the same node that exceed it never left the switch. This wasn't a big deal since the previous max CLTV limit was ~5000 blocks. Once it was lowered to 1008, the issue became more apparent. Therefore, all of our path finding attempts now have a restriction of said limit in in order to properly carry out HTLCs to the network.
This commit is contained in:
14 files changed
+75
-46
No files matched your search
@@ -212,8 +212,9 @@ type SendPaymentRequest struct {
|
||||
//any channel may be used.
|
||||
OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
|
||||
//*
|
||||
//An optional maximum total time lock for the route. If zero, there is no
|
||||
//maximum enforced.
|
||||
//An optional maximum total time lock for the route. This should not exceed
|
||||
//lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
||||
//`--max-cltv-expiry` is enforced.
|
||||
CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
|
||||
//*
|
||||
//Optional route hints to reach the destination through private channels.
|
||||
|
||||
Reference in new issue
Block a user