multichain-util clone is ignoring -datadir option

+3 votes

After creating a chain  like so:

 multichain-util create test-test_3 -datadir=/mnt/disks/data/multichain_data/

MultiChain 2.3 Utilities (latest protocol 20013)

Blockchain parameter set was successfully generated.
You can edit it in /mnt/disks/data/multichain_data/test-test_3/params.dat before running multichaind for the first time.

To generate blockchain please run "multichaind test-test_3 -daemon".

Cannot create chain parameter set, file /home/test/.multichain/public_access_3/params.dat does not exist

 I start the chain

multichaind test-test_3 -daemon

MultiChain 2.3 Daemon (Community Edition, latest protocol 20013)

Starting up node...

ERROR: Parameter set for blockchain test-test_3 is not complete. 


If you want to create new blockchain please run one of the following:

  multichain-util create test-test_3
  multichain-util clone <old-blockchain-name> test-test_3

And rerun multichaind test-test_3


If you want to connect to existing blockchain please specify seed node:

  multichaind test-test_3@<seed-node-ip>
  multichaind test-test_3@<seed-node-ip>:<seed-node-port>

And when I try to clone an existing chain, -datadir is ignored and instead the multichain-util thinks I am pointing to elsewhere. 

multichain-util clone public_access_3 test-test_3 -datadir=/mnt/disks/data/multichain_data/

MultiChain 2.3 Utilities (latest protocol 20013)

Cannot create chain parameter set, file /home/test/.multichain/public_access_3/params.dat does not exist
ERROR: Blockchain parameter set was not generated.

 

asked Nov 8, 2023 by chaintest

1 Answer

+1 vote

You need to pass the datadir option to multichaind as well, otherwise it doesn't know to look for the chain directory in the non-standard location. It looks like you didn't do that above.

As for multichain-util clone, you need to put the datadir parameter at the start, e.g.:

multichain-util -datadir=/mnt/disks/data/multichain_data clone public_access_3 test-test_3

We just tested this in MultiChain 2.3.3 and it works fine.

answered Nov 9, 2023 by MultiChain
worked, thank you!
...