mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 06:34:27 +01:00
multi: move bandwidth hints behind interface
This commit is contained in:
@@ -133,12 +133,8 @@ func createTestCtxFromGraphInstanceAssumeValid(t *testing.T,
|
||||
require.NoError(t, err)
|
||||
|
||||
sessionSource := &SessionSource{
|
||||
Graph: cachedGraph,
|
||||
QueryBandwidth: func(
|
||||
c *channeldb.DirectedChannel) lnwire.MilliSatoshi {
|
||||
|
||||
return lnwire.NewMSatFromSatoshis(c.Capacity)
|
||||
},
|
||||
Graph: cachedGraph,
|
||||
GetLink: graphInstance.getLink,
|
||||
PathFindingConfig: pathFindingConfig,
|
||||
MissionControl: mc,
|
||||
}
|
||||
@@ -160,11 +156,7 @@ func createTestCtxFromGraphInstanceAssumeValid(t *testing.T,
|
||||
SessionSource: sessionSource,
|
||||
ChannelPruneExpiry: time.Hour * 24,
|
||||
GraphPruneInterval: time.Hour * 2,
|
||||
QueryBandwidth: func(
|
||||
e *channeldb.DirectedChannel) lnwire.MilliSatoshi {
|
||||
|
||||
return lnwire.NewMSatFromSatoshis(e.Capacity)
|
||||
},
|
||||
GetLink: graphInstance.getLink,
|
||||
NextPaymentID: func() (uint64, error) {
|
||||
next := atomic.AddUint64(&uniquePaymentID, 1)
|
||||
return next, nil
|
||||
@@ -2467,7 +2459,7 @@ func TestFindPathFeeWeighting(t *testing.T) {
|
||||
// the edge weighting, we should select the direct path over the 2 hop
|
||||
// path even though the direct path has a higher potential time lock.
|
||||
path, err := dbFindPath(
|
||||
ctx.graph, nil, nil,
|
||||
ctx.graph, nil, &mockBandwidthHints{},
|
||||
noRestrictions,
|
||||
testPathFindingConfig,
|
||||
sourceNode.PubKeyBytes, target, amt, 0,
|
||||
|
||||
Reference in New Issue
Block a user