Skip to content

Commit 10ae40f

Browse files
committed
tapchannel: add proposed tolerance to unit test
1 parent 3ccda8b commit 10ae40f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tapchannel/aux_traffic_shaper_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestUnitConversionTolerance(t *testing.T) {
1919
)
2020
var (
2121
rate = rfqmath.BigIntFixedPoint{
22-
Coefficient: rfqmath.NewBigIntFromUint64(9852216748),
22+
Coefficient: rfqmath.NewBigIntFromUint64(9_852_216_748),
2323
Scale: 0,
2424
}
2525
)
@@ -61,8 +61,12 @@ func TestUnitConversionTolerance(t *testing.T) {
6161
newMarginAssetUnits, rate,
6262
)
6363

64+
proposedMargin := rfqmath.UnitsToMilliSatoshi(marginAssetUnits, rate) +
65+
lnwire.MilliSatoshi(numHTLCs)
66+
6467
t.Logf("Old tolerance allowed in msat: %d", allowedMarginMSat)
6568
t.Logf("New tolerance allowed in msat: %d", newAllowedMarginMSat)
69+
t.Logf("Proposed tolerance allowed in msat: %d", proposedMargin)
6670
}
6771

6872
// TestUnitConversionToleranceRapid uses rapid to randomly draw invoice amounts,

0 commit comments

Comments
 (0)