Fix initial fee in rapid rebalance

pull/41/head
rkfg 1 year ago
parent 7cb051fc97
commit 91acf21086

@ -205,7 +205,7 @@ func tryRebalance(ctx context.Context, r *regolancer, attempt *int) (err error,
if err == nil {
if params.AllowRapidRebalance {
rebalanceResult, _ := tryRapidRebalance(ctx, r, from, to, route, amt, feeMsat)
rebalanceResult, _ := tryRapidRebalance(ctx, r, from, to, route, amt, route.TotalFeesMsat)
if rebalanceResult.successfulAttempts > 0 {
log.Printf("%s rapid rebalances were successful, total amount: %s (fee: %s sat | %s ppm)\n",
@ -370,7 +370,7 @@ func tryRapidRebalance(ctx context.Context, r *regolancer, from, to uint64,
} else {
result.successfulAttempts++
result.successfulAmt += amt
result.paidFeeMsat += route.GetTotalFeesMsat()
result.paidFeeMsat += route.TotalFeesMsat
}
}
return result, nil

Loading…
Cancel
Save