nano-node
nano-node copied to clipboard
Forbid confirmation_height_clear to run along with another node instance
There is a recommendation in the docs for not using this option when the node is already running. This may lead to misbehavior on the node. Got a suggestion from Colin that trying an IPC connection may work to see if there is another local instance.
If so, an error message should be triggered, asking for a "cold run".
I was thinking about this one but have doubts with using IPC connection. What if running node has RPC disabled in config? Or connection would be created to nano_rpc process rather than node? I thought we could leverage named_mutex. Daemon could create such mutex with some constant name, CLI command could try to open it and in case of success it would trigger error. Would that work?
named_mutex makes sense to me