nano-node icon indicating copy to clipboard operation
nano-node copied to clipboard

Forbid confirmation_height_clear to run along with another node instance

Open thsfs opened this issue 2 years ago • 2 comments

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".

thsfs avatar May 26 '22 22:05 thsfs

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?

JerzyStanislawski avatar Jun 24 '22 20:06 JerzyStanislawski

named_mutex makes sense to me

dsiganos avatar Jun 26 '22 19:06 dsiganos