health checks prior to making/taking
when user wants to initiate a swap, we should first check whether
- [ ] monero-wallet-rpc is responsive
- [ ] electrum server is responsive
- [ ] monero daemon is responsive
In particular for new users, I can imagine this would avoid a lot of headache when they spin up the node for the first time and try to swap before they've completed their configuration.
I suggest we perform the same checks for autofunding, but that's less pressing.
Doing this for every swap seems wasteful and complicated. I also don't want to do this once for the first make or take swap and then cache the result in farcasterd.
How about this: We add a cli-command health-check , that triggers requests to the various syncers which in term query the various coin daemons.
you're right: doing it on every swap is too much, and caching the result's more state.
How about this: We add a cli-command
health-check, that triggers requests to the various syncers which in term query the various coin daemons.
Sounds good. I'd say the health-check should also be triggered once when farcasterd is launched, so it at least shows up in the logs.