Otherwise it blocks everything while it's working, which can be a
while for a slow command.
Fixes: #347
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
I don't understand the code at that location, but it can raise
a division by zero in testing environment where no real graph
was accessible because it couldn't be downloaded.
The old skipIf annotation doesn't seem to work correctly:
```
PytestUnknownMarkWarning: Unknown pytest.mark.skipIf - is this a typo?
You can register custom marks to avoid this warning -
for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.skipIf(True, "Test autopilot is hanging on DNS request")
```
This commit try to solve the following exception with an additional sanity check:
```
{
"code": -32600,
"message": "Error while processing summary: 'Plugin' object has no attribute 'persist'",
"traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 627, in _dispatch_request\n result = self._exec_func(method.func, request)\n File \"/usr/local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 609, in _exec_func\n return func(*ba.args, **ba.kwargs)\n File \"/home/_lightning/plugins/summary.py\", line 124, in summary\n addpeer(plugin, p)\n File \"/var/git/plugins/summary/summary_avail.py\", line 7, in addpeer\n if pid not in p.persist['peerstate']:\nAttributeError: 'Plugin' object has no attribute 'persist'\n"
}
```
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Knowing the fee per channel is very useful for fee selection.
I assume an option can be added to show the fees only if --details is an argument, but it will make the code a bit less clean.
I had several successful rebalances, and when I call `rebalancereport` it takes some time to collect info about them.
A possible performance improvement: `rebalancereport` does not call `listpays` for every rebalance one by one, but only once.
In my case, this changes the execution time from ~140 secs to ~7 secs.