rebalance-lnd icon indicating copy to clipboard operation
rebalance-lnd copied to clipboard

Try with lower amounts on failure

Open C-Otto opened this issue 6 years ago • 2 comments

If rebalancing did not work for amount 2N, try again (twice?) with amount N (recursively?).

C-Otto avatar Jan 04 '19 20:01 C-Otto

I'm doing something similar now, using very simple bash scripts. For each channel of interest, I just double the --percentage parameter on success until the channel is balanced or the command failed.

40 is used for --ratio:

for chan in `./unbalanced_chans.sh 40`; do ./incremental_rebalance.sh $chan; done

unbalanced_chans.sh:

#!/bin/bash
./rebalance.py -l -r $1 | grep "Channel ID"|cut -f 2 -d ":" | cut -f 3 -d " "

incremental_rebalance.sh:

#!/bin/bash
./rebalance.py -t $1 -p 1 && \
./rebalance.py -t $1 -p 2 && \
./rebalance.py -t $1 -p 4 && \
./rebalance.py -t $1 -p 8 && \
./rebalance.py -t $1 -p 16 && \
./rebalance.py -t $1 -p 32 && \
./rebalance.py -t $1 -p 64 && \
./rebalance.py -t $1

C-Otto avatar Jan 18 '20 15:01 C-Otto

This is how I do it: https://github.com/C-Otto/rebalance-lnd/issues/184

It starts at 100% and then decreases it by a certain factor every cycle ...

xanoni avatar Jul 27 '21 01:07 xanoni