Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try with lower amounts on failure #33

Open
C-Otto opened this issue Jan 4, 2019 · 2 comments
Open

Try with lower amounts on failure #33

C-Otto opened this issue Jan 4, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@C-Otto
Copy link
Owner

C-Otto commented Jan 4, 2019

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

@wamde wamde added the enhancement New feature or request label Jan 9, 2019
@C-Otto
Copy link
Owner Author

C-Otto commented Jan 18, 2020

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

@xanoni
Copy link

xanoni commented Jul 27, 2021

This is how I do it: #184

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants