liquidity: fix tests to reflect new miner fee scaling

pull/581/head
George Tsagkarelis 1 year ago
parent 102d3cdd1a
commit 36f014ac0a
No known key found for this signature in database
GPG Key ID: 0807D1013F48208A

@ -73,11 +73,13 @@ var (
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()}, OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
MaxPrepayRoutingFee: prepayFee, MaxPrepayRoutingFee: prepayFee,
MaxSwapRoutingFee: routingFee, MaxSwapRoutingFee: routingFee,
MaxMinerFee: scaleMinerFee(testQuote.MinerFee), MaxMinerFee: scaleMaxMinerFee(
MaxSwapFee: testQuote.SwapFee, scaleMinerFee(testQuote.MinerFee),
MaxPrepayAmount: testQuote.PrepayAmount, ),
SweepConfTarget: defaultConfTarget, MaxSwapFee: testQuote.SwapFee,
Initiator: autoloopSwapInitiator, MaxPrepayAmount: testQuote.PrepayAmount,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
} }
// chan2Rec is the suggested swap for channel 2 when we use chanRule. // chan2Rec is the suggested swap for channel 2 when we use chanRule.
@ -86,11 +88,13 @@ var (
OutgoingChanSet: loopdb.ChannelSet{chanID2.ToUint64()}, OutgoingChanSet: loopdb.ChannelSet{chanID2.ToUint64()},
MaxPrepayRoutingFee: prepayFee, MaxPrepayRoutingFee: prepayFee,
MaxSwapRoutingFee: routingFee, MaxSwapRoutingFee: routingFee,
MaxMinerFee: scaleMinerFee(testQuote.MinerFee), MaxMinerFee: scaleMaxMinerFee(
MaxPrepayAmount: testQuote.PrepayAmount, scaleMinerFee(testQuote.MinerFee),
MaxSwapFee: testQuote.SwapFee, ),
SweepConfTarget: defaultConfTarget, MaxPrepayAmount: testQuote.PrepayAmount,
Initiator: autoloopSwapInitiator, MaxSwapFee: testQuote.SwapFee,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
} }
// chan1Out is a contract that uses channel 1, used to represent on // chan1Out is a contract that uses channel 1, used to represent on
@ -771,11 +775,13 @@ func TestSuggestSwaps(t *testing.T) {
}, },
MaxPrepayRoutingFee: prepay, MaxPrepayRoutingFee: prepay,
MaxSwapRoutingFee: routing, MaxSwapRoutingFee: routing,
MaxMinerFee: scaleMinerFee(testQuote.MinerFee), MaxMinerFee: scaleMaxMinerFee(
MaxSwapFee: testQuote.SwapFee, scaleMinerFee(testQuote.MinerFee),
MaxPrepayAmount: testQuote.PrepayAmount, ),
SweepConfTarget: defaultConfTarget, MaxSwapFee: testQuote.SwapFee,
Initiator: autoloopSwapInitiator, MaxPrepayAmount: testQuote.PrepayAmount,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
}, },
}, },
DisqualifiedChans: noneDisqualified, DisqualifiedChans: noneDisqualified,
@ -1330,11 +1336,13 @@ func TestSizeRestrictions(t *testing.T) {
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()}, OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
MaxPrepayRoutingFee: prepay, MaxPrepayRoutingFee: prepay,
MaxSwapRoutingFee: routing, MaxSwapRoutingFee: routing,
MaxMinerFee: scaleMinerFee(testQuote.MinerFee), MaxMinerFee: scaleMaxMinerFee(
MaxSwapFee: testQuote.SwapFee, scaleMinerFee(testQuote.MinerFee),
MaxPrepayAmount: testQuote.PrepayAmount, ),
SweepConfTarget: defaultConfTarget, MaxSwapFee: testQuote.SwapFee,
Initiator: autoloopSwapInitiator, MaxPrepayAmount: testQuote.PrepayAmount,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
} }
) )
@ -1487,7 +1495,9 @@ func TestFeePercentage(t *testing.T) {
rec = loop.OutRequest{ rec = loop.OutRequest{
Amount: 7500, Amount: 7500,
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()}, OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
MaxMinerFee: scaleMinerFee(okQuote.MinerFee), MaxMinerFee: scaleMaxMinerFee(
scaleMinerFee(testQuote.MinerFee),
),
MaxSwapFee: okQuote.SwapFee, MaxSwapFee: okQuote.SwapFee,
MaxPrepayAmount: okQuote.PrepayAmount, MaxPrepayAmount: okQuote.PrepayAmount,
SweepConfTarget: defaultConfTarget, SweepConfTarget: defaultConfTarget,
@ -1650,7 +1660,9 @@ func TestBudgetWithLoopin(t *testing.T) {
rec = loop.OutRequest{ rec = loop.OutRequest{
Amount: 7500, Amount: 7500,
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()}, OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
MaxMinerFee: scaleMinerFee(okQuote.MinerFee), MaxMinerFee: scaleMaxMinerFee(
scaleMinerFee(testQuote.MinerFee),
),
MaxSwapFee: okQuote.SwapFee, MaxSwapFee: okQuote.SwapFee,
MaxPrepayAmount: okQuote.PrepayAmount, MaxPrepayAmount: okQuote.PrepayAmount,
SweepConfTarget: defaultConfTarget, SweepConfTarget: defaultConfTarget,

Loading…
Cancel
Save