remove probability from route output

This commit is contained in:
Carsten Otto
2025-02-16 13:51:24 +01:00
parent 6a84e71532
commit 0c0df439eb
3 changed files with 9 additions and 10 deletions

View File

@@ -119,8 +119,7 @@ public class PaymentStatus extends Flux<InstantWithString> {
.toList();
return route.getAmount().toStringSat() + ": " + edgeInformation + ", "
+ route.getFeeRate() + "ppm, "
+ route.getFeeRateWithFirstHop() + "ppm with first hop, " +
"probability " + route.getProbability();
+ route.getFeeRateWithFirstHop() + "ppm with first hop";
}
private String getFormattedEdge(EdgeWithLiquidityInformation edge) {

View File

@@ -53,13 +53,13 @@ class PaymentLoopTest {
private static final PaymentOptions PAYMENT_OPTIONS = PaymentOptions.forFeeRateWeight(123);
private static final String MPP_1_ROUTE_1 =
"100: [712345x123x1 (cap 21,000,000), 799999x456x3 (cap 21,000,000), 799999x456x5 (cap 21,000,000)], " +
"400ppm, 600ppm with first hop, probability 0.9999857143544217";
"400ppm, 600ppm with first hop";
private static final String MPP_1_ROUTE_2 =
"200: [799999x456x2 (cap 21,000,000), 799999x456x3 (cap 21,000,000)], " +
"200ppm, 400ppm with first hop, probability 0.9999809524725624";
"200ppm, 400ppm with first hop";
private static final String MPP_2_ROUTE_1 =
"50: [799999x456x3 (cap 21,000,000), 799999x456x5 (cap 21,000,000)], " +
"200ppm, 400ppm with first hop, probability 0.9999952381011338";
"200ppm, 400ppm with first hop";
@InjectMocks
private PaymentLoop paymentLoop;

View File

@@ -82,7 +82,7 @@ class PaymentStatusTest {
"[712345x123x1 (cap 21,000,000), " +
"799999x456x3 (cap 21,000,000), " +
"799999x456x5 (cap 21,000,000)], " +
"400ppm, 600ppm with first hop, probability 0.9999857143544217");
"400ppm, 600ppm with first hop");
}
@Test
@@ -91,7 +91,7 @@ class PaymentStatusTest {
assertThat(readMessages(paymentStatus, 2))
.map(InstantWithString::string)
.contains(ROUTE_PREFIX + "[712345x123x1 (min 10, cap 21,000,000)], " +
"0ppm, 200ppm with first hop, probability 0.9999957142838776");
"0ppm, 200ppm with first hop");
}
@Test
@@ -100,7 +100,7 @@ class PaymentStatusTest {
assertThat(readMessages(paymentStatus, 2))
.map(InstantWithString::string)
.contains(ROUTE_PREFIX + "[712345x123x1 (max 11, cap 21,000,000)], " +
"0ppm, 200ppm with first hop, probability 0.0");
"0ppm, 200ppm with first hop");
}
@Test
@@ -108,7 +108,7 @@ class PaymentStatusTest {
sendSingleEdge(EdgeWithLiquidityInformation.forKnownLiquidity(EDGE, Coins.ofSatoshis(12)));
assertThat(readMessages(paymentStatus, 2))
.map(InstantWithString::string)
.contains(ROUTE_PREFIX + "[712345x123x1 (known 12)], 0ppm, 200ppm with first hop, probability 0.0");
.contains(ROUTE_PREFIX + "[712345x123x1 (known 12)], 0ppm, 200ppm with first hop");
}
@Test
@@ -120,7 +120,7 @@ class PaymentStatusTest {
.contains("Sending to route #2: 200: " +
"[799999x456x2 (cap 21,000,000), " +
"799999x456x3 (cap 21,000,000)], " +
"200ppm, 400ppm with first hop, probability 0.9999809524725624");
"200ppm, 400ppm with first hop");
}
private void sendSingleEdge(EdgeWithLiquidityInformation edge) {