mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
liquidity: fix tests to reflect new miner fee scaling
This commit is contained in:
parent
102d3cdd1a
commit
36f014ac0a
1 changed files with 34 additions and 22 deletions
|
|
@ -73,11 +73,13 @@ var (
|
|||
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
|
||||
MaxPrepayRoutingFee: prepayFee,
|
||||
MaxSwapRoutingFee: routingFee,
|
||||
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
MaxMinerFee: scaleMaxMinerFee(
|
||||
scaleMinerFee(testQuote.MinerFee),
|
||||
),
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
}
|
||||
|
||||
// chan2Rec is the suggested swap for channel 2 when we use chanRule.
|
||||
|
|
@ -86,11 +88,13 @@ var (
|
|||
OutgoingChanSet: loopdb.ChannelSet{chanID2.ToUint64()},
|
||||
MaxPrepayRoutingFee: prepayFee,
|
||||
MaxSwapRoutingFee: routingFee,
|
||||
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
MaxMinerFee: scaleMaxMinerFee(
|
||||
scaleMinerFee(testQuote.MinerFee),
|
||||
),
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
}
|
||||
|
||||
// chan1Out is a contract that uses channel 1, used to represent on
|
||||
|
|
@ -771,11 +775,13 @@ func TestSuggestSwaps(t *testing.T) {
|
|||
},
|
||||
MaxPrepayRoutingFee: prepay,
|
||||
MaxSwapRoutingFee: routing,
|
||||
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
MaxMinerFee: scaleMaxMinerFee(
|
||||
scaleMinerFee(testQuote.MinerFee),
|
||||
),
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
},
|
||||
},
|
||||
DisqualifiedChans: noneDisqualified,
|
||||
|
|
@ -1330,11 +1336,13 @@ func TestSizeRestrictions(t *testing.T) {
|
|||
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
|
||||
MaxPrepayRoutingFee: prepay,
|
||||
MaxSwapRoutingFee: routing,
|
||||
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
MaxMinerFee: scaleMaxMinerFee(
|
||||
scaleMinerFee(testQuote.MinerFee),
|
||||
),
|
||||
MaxSwapFee: testQuote.SwapFee,
|
||||
MaxPrepayAmount: testQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
Initiator: autoloopSwapInitiator,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -1487,7 +1495,9 @@ func TestFeePercentage(t *testing.T) {
|
|||
rec = loop.OutRequest{
|
||||
Amount: 7500,
|
||||
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
|
||||
MaxMinerFee: scaleMinerFee(okQuote.MinerFee),
|
||||
MaxMinerFee: scaleMaxMinerFee(
|
||||
scaleMinerFee(testQuote.MinerFee),
|
||||
),
|
||||
MaxSwapFee: okQuote.SwapFee,
|
||||
MaxPrepayAmount: okQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
|
|
@ -1650,7 +1660,9 @@ func TestBudgetWithLoopin(t *testing.T) {
|
|||
rec = loop.OutRequest{
|
||||
Amount: 7500,
|
||||
OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()},
|
||||
MaxMinerFee: scaleMinerFee(okQuote.MinerFee),
|
||||
MaxMinerFee: scaleMaxMinerFee(
|
||||
scaleMinerFee(testQuote.MinerFee),
|
||||
),
|
||||
MaxSwapFee: okQuote.SwapFee,
|
||||
MaxPrepayAmount: okQuote.PrepayAmount,
|
||||
SweepConfTarget: defaultConfTarget,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue