Open
Description
Bug Description:
The rebalance command provided by the rebalance.py plugin fails when attempting to rebalance funds to a local channel that is marked as private. The error occurs during the peer lookup phase for the incoming private channel.
111111x1111x1 public channel
222222x222x2 private channel
lightning-cli rebalance 111111x1111x1 222222x222x2 5000000
{
"code": -32600,
"message": "Error while processing rebalance: RPC call failed: method: rebalance, payload: {'outgoing_scid': '111111x1111x1', 'incoming_scid': '222222x222x2', 'msatoshi': 5000000msat, 'retry_for': 60, 'maxfeepercent': 0.5, 'exemptfee': 5000msat}, error: {'message': 'Cannot find peer for channel: 222222x222x2'}",
"traceback": "Traceback (most recent call last):\n File \"/home/ali/.local/lib/python3.10/site-packages/pyln/client/plugin.py\", line 707, in _dispatch_request\n result = self._exec_func(method.func, request)\n File \"/home/ali/.local/lib/python3.10/site-packages/pyln/client/plugin.py\", line 684, in _exec_func\n ret = func(*ba.args, **ba.kwargs)\n File \"/home/ali/.lightning/plugins-available/rebalance/rebalance.py\", line 328, in rebalance\n incoming_node_id = peer_from_scid(incoming_scid, my_node_id, payload)\n File \"/home/ali/.lightning/plugins-available/rebalance/rebalance.py\", line 116, in peer_from_scid\n raise RpcError(\npyln.client.lightning.RpcError: RPC call failed: method: rebalance, payload: {'outgoing_scid': '111111x1111x1', 'incoming_scid': '222222x222x2', 'msatoshi': 5000000msat, 'retry_for': 60, 'maxfeepercent': 0.5, 'exemptfee': 5000msat}, error: {'message': 'Cannot find peer for channel: 222222x222x2'}\n"
}
Expected Result:
The rebalance command should correctly identify the peer associated with the local private channel 222222x222x2 and proceed with attempting the circular rebalance payment.
Potential Cause (from developer discussion):
https://t.me/lightningd/36555
Metadata
Metadata
Assignees
Labels
No labels