Rebalancing a ring


I am trying to balance a ring.

Has anyone tried this command before?
~/umbrel/bin/lncli buildroute --amt [AMOUNT_IN_SATS] --hops [LIST_OF_PUBLIC_KEYS_OF_PEERS] --outgoing_chan_id [OUTGOING_CHAN_ID]

Its not returning anything for me.
No error or success.
If this works, I am trying to do this:

~/umbrel/bin/lncli buildroute --amt [AMOUNT_IN_SATS] --hops [LIST_OF_PUBLIC_KEYS_OF_PEERS] --outgoing_chan_id [OUTGOING_CHAN_ID] | jq -r ‘(.route.hops[-1] | .mpp_record) |= {payment_addr:“[PAYMENT_ADDRESS]”, total_amt_msat: “[AMOUNT_IN_MILLI_SATS]”}’ | lncli sendtoroute --payment_hash=[PAYMENT_HASH] -

I am open to other options as well, ThunderHub has a balancing tool but that does not let me select a path.

Hey Nitesh,

It looks like you may of just checked if there was a route around your ring. Afterwards there’s a little bit more to build a transaction with it and pay yourself.

I’ve found using this script worked and a bit easier to do than using commands: Igniter. Just need to follow the instructions on editing the file with nodes, channel and amount.

Also note the comment at the bottom about the workaround for umbrel.

1 Like

Works like a charm! Thanks!

1 Like

I’m a noob to command line/SSH, so I’m really confused. Do I copy the script into command line, or somehow save the file with the script in it to somewhere on the umbrel and then sudo nano into it?
Also I’m unfamiliar if there is parts of the file I need to delete or else the script will err out, I would imagine.

You can copy paste the script into the command line, but first copy paste it into a text editor and make edits to the pub keys for rebalancing and the channel ID of the outgoing pub key. After that you can just paste into command prompt and run it.