mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 02:21:08 +02:00
routing: assume TLV payloads everywhere
This commit removes another check for TLV payload support of the destination node. We assume TLV payloads as the default everywhere else, so we just remove two checks that were previously forgotten.
This commit is contained in:
committed by
Elle Mouton
parent
ce813276d5
commit
b300da8446
@ -543,34 +543,16 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
return nil, 0, errMissingDependentFeature
|
||||
}
|
||||
|
||||
// Now that we know the feature vector is well formed, we'll proceed in
|
||||
// checking that it supports the features we need, given our
|
||||
// restrictions on the final hop.
|
||||
|
||||
// If the caller needs to send custom records, check that our
|
||||
// destination feature vector supports TLV.
|
||||
if len(r.DestCustomRecords) > 0 &&
|
||||
!features.HasFeature(lnwire.TLVOnionPayloadOptional) {
|
||||
|
||||
return nil, 0, errNoTlvPayload
|
||||
}
|
||||
|
||||
// If the caller has a payment address to attach, check that our
|
||||
// destination feature vector supports them.
|
||||
// Now that we know the feature vector is well-formed, we'll proceed in
|
||||
// checking that it supports the features we need. If the caller has a
|
||||
// payment address to attach, check that our destination feature vector
|
||||
// supports them.
|
||||
if r.PaymentAddr != nil &&
|
||||
!features.HasFeature(lnwire.PaymentAddrOptional) {
|
||||
|
||||
return nil, 0, errNoPaymentAddr
|
||||
}
|
||||
|
||||
// If the caller needs to send custom records, check that our
|
||||
// destination feature vector supports TLV.
|
||||
if r.Metadata != nil &&
|
||||
!features.HasFeature(lnwire.TLVOnionPayloadOptional) {
|
||||
|
||||
return nil, 0, errNoTlvPayload
|
||||
}
|
||||
|
||||
// Set up outgoing channel map for quicker access.
|
||||
var outgoingChanMap map[uint64]struct{}
|
||||
if len(r.OutgoingChannelIDs) > 0 {
|
||||
|
Reference in New Issue
Block a user