mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-04 04:02:38 +02:00
lnrpc+lnrpc/routerrpc: add a new TLV record field to the Hop proto
In this commit, we add a new field to the Hop proto to allow callers to be able to specify TLV records for the SendToRoute call, and also to be able to display TLV records that were used during regular path finding. We also update SendPayment to support dest TLV records.
This commit is contained in:
@@ -249,7 +249,7 @@ func (s *Server) EstimateRouteFee(ctx context.Context,
|
||||
s.cfg.RouterBackend.SelfNode, destNode, amtMsat,
|
||||
&routing.RestrictParams{
|
||||
FeeLimit: feeLimit,
|
||||
},
|
||||
}, nil,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -550,9 +550,12 @@ func (s *Server) trackPayment(paymentHash lntypes.Hash,
|
||||
|
||||
status.State = PaymentState_SUCCEEDED
|
||||
status.Preimage = result.Preimage[:]
|
||||
status.Route = router.MarshallRoute(
|
||||
status.Route, err = router.MarshallRoute(
|
||||
result.Route,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
state, err := marshallFailureReason(
|
||||
result.FailureReason,
|
||||
@@ -562,9 +565,12 @@ func (s *Server) trackPayment(paymentHash lntypes.Hash,
|
||||
}
|
||||
status.State = state
|
||||
if result.Route != nil {
|
||||
status.Route = router.MarshallRoute(
|
||||
status.Route, err = router.MarshallRoute(
|
||||
result.Route,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user