routing: add TlvTrafficShaper to bandwidth hints
This commit is contained in:
1 parent
5dcda25881
commit
5b4de5f0d4
12 files changed
+314
-43
No files matched your search
@@ -8,9 +8,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/kvdb"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
"github.com/lightningnetwork/lnd/tlv"
|
||||
"github.com/lightningnetwork/lnd/zpay32"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -35,6 +37,10 @@ func (m *mockBandwidthHints) availableChanBandwidth(channelID uint64,
|
||||
return balance, ok
|
||||
}
|
||||
|
||||
func (m *mockBandwidthHints) firstHopCustomBlob() fn.Option[tlv.Blob] {
|
||||
return fn.None[tlv.Blob]()
|
||||
}
|
||||
|
||||
// integratedRoutingContext defines the context in which integrated routing
|
||||
// tests run.
|
||||
type integratedRoutingContext struct {
|
||||
@@ -227,6 +233,9 @@ func (c *integratedRoutingContext) testPayment(maxParts uint32,
|
||||
// Find a route.
|
||||
route, err := session.RequestRoute(
|
||||
amtRemaining, lnwire.MaxMilliSatoshi, inFlightHtlcs, 0,
|
||||
lnwire.CustomRecords{
|
||||
lnwire.MinCustomRecordsTlvType: []byte{1, 2, 3},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return attempts, err
|
||||
|
||||
Reference in new issue
Block a user