@@ -73,11 +73,13 @@ var (
7373 OutgoingChanSet : loopdb.ChannelSet {chanID1 .ToUint64 ()},
7474 MaxPrepayRoutingFee : prepayFee ,
7575 MaxSwapRoutingFee : routingFee ,
76- MaxMinerFee : scaleMinerFee (testQuote .MinerFee ),
77- MaxSwapFee : testQuote .SwapFee ,
78- MaxPrepayAmount : testQuote .PrepayAmount ,
79- SweepConfTarget : defaultConfTarget ,
80- Initiator : autoloopSwapInitiator ,
76+ MaxMinerFee : scaleMaxMinerFee (
77+ scaleMinerFee (testQuote .MinerFee ),
78+ ),
79+ MaxSwapFee : testQuote .SwapFee ,
80+ MaxPrepayAmount : testQuote .PrepayAmount ,
81+ SweepConfTarget : defaultConfTarget ,
82+ Initiator : autoloopSwapInitiator ,
8183 }
8284
8385 // chan2Rec is the suggested swap for channel 2 when we use chanRule.
@@ -86,11 +88,13 @@ var (
8688 OutgoingChanSet : loopdb.ChannelSet {chanID2 .ToUint64 ()},
8789 MaxPrepayRoutingFee : prepayFee ,
8890 MaxSwapRoutingFee : routingFee ,
89- MaxMinerFee : scaleMinerFee (testQuote .MinerFee ),
90- MaxPrepayAmount : testQuote .PrepayAmount ,
91- MaxSwapFee : testQuote .SwapFee ,
92- SweepConfTarget : defaultConfTarget ,
93- Initiator : autoloopSwapInitiator ,
91+ MaxMinerFee : scaleMaxMinerFee (
92+ scaleMinerFee (testQuote .MinerFee ),
93+ ),
94+ MaxPrepayAmount : testQuote .PrepayAmount ,
95+ MaxSwapFee : testQuote .SwapFee ,
96+ SweepConfTarget : defaultConfTarget ,
97+ Initiator : autoloopSwapInitiator ,
9498 }
9599
96100 // chan1Out is a contract that uses channel 1, used to represent on
@@ -771,11 +775,13 @@ func TestSuggestSwaps(t *testing.T) {
771775 },
772776 MaxPrepayRoutingFee : prepay ,
773777 MaxSwapRoutingFee : routing ,
774- MaxMinerFee : scaleMinerFee (testQuote .MinerFee ),
775- MaxSwapFee : testQuote .SwapFee ,
776- MaxPrepayAmount : testQuote .PrepayAmount ,
777- SweepConfTarget : defaultConfTarget ,
778- Initiator : autoloopSwapInitiator ,
778+ MaxMinerFee : scaleMaxMinerFee (
779+ scaleMinerFee (testQuote .MinerFee ),
780+ ),
781+ MaxSwapFee : testQuote .SwapFee ,
782+ MaxPrepayAmount : testQuote .PrepayAmount ,
783+ SweepConfTarget : defaultConfTarget ,
784+ Initiator : autoloopSwapInitiator ,
779785 },
780786 },
781787 DisqualifiedChans : noneDisqualified ,
@@ -1330,11 +1336,13 @@ func TestSizeRestrictions(t *testing.T) {
13301336 OutgoingChanSet : loopdb.ChannelSet {chanID1 .ToUint64 ()},
13311337 MaxPrepayRoutingFee : prepay ,
13321338 MaxSwapRoutingFee : routing ,
1333- MaxMinerFee : scaleMinerFee (testQuote .MinerFee ),
1334- MaxSwapFee : testQuote .SwapFee ,
1335- MaxPrepayAmount : testQuote .PrepayAmount ,
1336- SweepConfTarget : defaultConfTarget ,
1337- Initiator : autoloopSwapInitiator ,
1339+ MaxMinerFee : scaleMaxMinerFee (
1340+ scaleMinerFee (testQuote .MinerFee ),
1341+ ),
1342+ MaxSwapFee : testQuote .SwapFee ,
1343+ MaxPrepayAmount : testQuote .PrepayAmount ,
1344+ SweepConfTarget : defaultConfTarget ,
1345+ Initiator : autoloopSwapInitiator ,
13381346 }
13391347 )
13401348
@@ -1487,7 +1495,9 @@ func TestFeePercentage(t *testing.T) {
14871495 rec = loop.OutRequest {
14881496 Amount : 7500 ,
14891497 OutgoingChanSet : loopdb.ChannelSet {chanID1 .ToUint64 ()},
1490- MaxMinerFee : scaleMinerFee (okQuote .MinerFee ),
1498+ MaxMinerFee : scaleMaxMinerFee (
1499+ scaleMinerFee (testQuote .MinerFee ),
1500+ ),
14911501 MaxSwapFee : okQuote .SwapFee ,
14921502 MaxPrepayAmount : okQuote .PrepayAmount ,
14931503 SweepConfTarget : defaultConfTarget ,
@@ -1555,7 +1565,7 @@ func TestFeePercentage(t *testing.T) {
15551565 quote : & loop.LoopOutQuote {
15561566 SwapFee : 60 ,
15571567 PrepayAmount : 30 ,
1558- MinerFee : 1 ,
1568+ MinerFee : 50 ,
15591569 },
15601570 suggestions : & Suggestions {
15611571 DisqualifiedChans : map [lnwire.ShortChannelID ]Reason {
@@ -1650,7 +1660,9 @@ func TestBudgetWithLoopin(t *testing.T) {
16501660 rec = loop.OutRequest {
16511661 Amount : 7500 ,
16521662 OutgoingChanSet : loopdb.ChannelSet {chanID1 .ToUint64 ()},
1653- MaxMinerFee : scaleMinerFee (okQuote .MinerFee ),
1663+ MaxMinerFee : scaleMaxMinerFee (
1664+ scaleMinerFee (testQuote .MinerFee ),
1665+ ),
16541666 MaxSwapFee : okQuote .SwapFee ,
16551667 MaxPrepayAmount : okQuote .PrepayAmount ,
16561668 SweepConfTarget : defaultConfTarget ,
0 commit comments