Building from source with custom command names

+2 votes
Is it possible to compile and build the three files (multichaind, multichain-util and multichain-cli) with custom command names? for example: name the files blockchaind, blockchain-util and blockchain-cli and use blockchain-util create chain1 to create chain1?
asked Aug 4, 2017 by girish

2 Answers

0 votes
[This answer is wrong but left here because of the subsequent discussion – please see other answer.] You can just rename the executables after they are built, and they will work fine.
answered Aug 4, 2017 by MultiChain
edited Aug 5, 2017 by MultiChain
I tried renaming the release version and it did not work (I could create a blockchain but could't run it).Will it work if I rename after building from source?
Please post a transcript of how you renamed the executables, what you ran, and the error messages you saw - because this surprises us.
I renamed the files as following:
multichaind -> alphachaind
multichain-util -> alphachain-util
multichain-cli -> alphachain-cli

Then I ran "alphachain-util create chain1" and the response is
MultiChain utilities build 1.0 beta 2 protocol 10008

Usage:
  multichain-util create <blockchain-name>  ( <protocol-version> = 10008 ) [options]        Creates new multichain configuration file /home/ubuntu/.multichain/<blockchain-name>/params.dat with default parameters
  multichain-util clone <old-blockchain-name> <new-blockchain-name> [options]               Creates new multichain configuration file /home/ubuntu/.multichain/<new-blockchain-name>/params.dat copying parameters
                                                                                            from /home/ubuntu/.multichain/<old-blockchain-name>/params.dat

Options:
  -datadir=<dir>                              Specify data directory
  -<parameter-name>=<parameter-value>         Specify blockchain parameter value, e.g. -anyone-can-connect=true

And there is no ".multichain" folder or any file related to multichain. And there are no background processes either.

Whereas when I run it normally without renaming, I get
MultiChain utilities build 1.0 beta 2 protocol 10008

Blockchain parameter set was successfully generated.
You can edit it in /home/ubuntu/.multichain/chain1/params.dat before running multichaind for the first time.

To generate blockchain please run "multichaind chain1 -daemon".
0 votes

My mistake – the other answer was wrong. It's actually not possible to rename the binaries right now because there are hard-coded checks inside the code. You can fix this by removing the checks from line 124 of utilwrapper.cpp and compiling yourself, or else wait for version 1.0.1.

answered Aug 5, 2017 by MultiChain
...