MultiChain / multichain

Source code for multichaind, multichain-cli and multichain-util.
GNU General Public License v3.0
536 stars 259 forks source link

"-rpcport" not honored in "params.dat" #128

Closed phmarek closed 4 years ago

phmarek commented 4 years ago

When connecting a multichain instance to another one via multichaind <chain>@<server>:<bcport> -rpcport=<rpcport>, rpcport is correctly used for RPC - but <bcport> - 1 is put in params.dat.

Seems that a wrong default value is used for the file; that means processes parsing that file (or a restarted daemon) use the wrong port.

This is with 2.1.1.

gidgreen commented 4 years ago

The params.dat file contains blockchain default parameters, and is unaffected by runtime parameters. (In general, we recommend posting questions like this on the Q&A.)

phmarek commented 4 years ago

Hi Gideon,

thanks for the answer!

If it were only default parameters and not related to the actual active blockchain at all, then why write it out on a connecting node?

The blockchain (net) port is correctly written to params.dat, just the RPC port is "guessed" instead of taken in from the command line; I still believe for consistencies' sake it should be either both or none, preferably both, of course.

gidgreen commented 4 years ago

The params.dat contains the blockchain parameters. It is not node-specific in any way. Part of this definition is the default port for RPC. If you start your node without the rpcport parameter this is what will be used.