VeriBlock / nodecore

Other
12 stars 16 forks source link

CLI getdebuginfo assumes nodecore in the same directory #158

Closed Leonardiae closed 4 years ago

Leonardiae commented 4 years ago

When executing getdebuginfo on the CLI it assumes Nodecore is in the same directory as the CLI. Maybe it's possible to detect where the connected Nodecore is located and use that information (I have several Nodecores running).

getdebuginfo
Running several checks, this may take a few moments...
Detected network: mainnet
Detected NodeCore folder: E:\Veriblock\downloads\veriblock-nodecore-all-0.4.9\nodecore-0.4.9
  ERROR: (2020-06-23 08:13:34) [V004] Unable to find the network data folder
         The network data folder E:\Veriblock\downloads\veriblock-nodecore-all-0.4.9\nodecore-0.4.9\bin\mainnet doesn't exists.

In this case I downloaded the Nodecore suite and extracted it. Then I ran Nodecore CLI and connect it to a Nodecore running somewhere else. Nodecore CLI then finds the Nodecore within the downloaded package and assumes that's the one to check, but it has not network data folder because this Nodecore has never ran yet.

BernatCarbo commented 4 years ago

If your file tree is different than the default distributed package, you should use the command parameters to specify the location from the folders:

getdebuginfo <network> <networkDataFolder> <nodeCoreFolder>

Example:

getdebuginfo mainnet c:/nodecore_data c:/downloads/veriblock-nodecore-all-0.4.9
Leonardiae commented 4 years ago

My file structure is same as the distributed package but when using CLI you have to connect to a node. Apart from the file structure (which I did not change in this case) I was expecting that Getdebuginfo would check the connected node, which can be different from the node (running) in the location of the CLI.

I found out that this is not the case because the node in the filestructure where I was starting the CLI from was not running. If this node was running I would have seen the debuginfo of this node while I was expecting to see the information from the node I connected to. But maybe my expectation was wrong.

BernatCarbo commented 4 years ago

We will have to add more documentation about this command. It's an offline command, this means that is not needed to connect to a NodeCore to run it, also it should be on the same enviroment than the CLI.

I understand what you mean but is not meant to work like this, by default it will check the nodecore from the distributted package and if for any reason this is not the node that you're interested to 'debug', you should use the parameters to specify it.

Leonardiae commented 4 years ago

I understand, thanks.