Fix from channel selection logic

pull/11/head v1.1.1
rkfg 2 years ago
parent 869fcdb466
commit 6f381ae310

@ -48,7 +48,7 @@ func (r *regolancer) getChannelCandidates(fromPerc, toPerc, amount int64) error
r.toChannels = append(r.toChannels, c)
}
}
if c.RemoteBalance < c.Capacity*fromPerc/100 && c.RemoteBalance-amount < c.Capacity/2 {
if c.RemoteBalance < c.Capacity*fromPerc/100 && c.RemoteBalance+amount < c.Capacity/2 {
if _, ok := r.excludeOut[c.ChanId]; ok {
continue
}

Loading…
Cancel
Save