Can not get all list wallet addresses

+1 vote
Hello,

I have a question when I call: getaddresses in Multichain.

I have 2 nodes multichain. (2 nodes are running)

In the Node 1, I back up file: "wallet.dat" and folder: "wallet" and I restore it to Node 2.

In the Node 2, I call function: "getaddresses", but when I check list address in Node 2. It's old addresses and different list wallet address in node 1.

I have to stop and re-start multichain node 2. Then, I check list wallet address again. It's updated and same with list wallet addresses in Node 1.

So, How to update the wallet address list in node 2 without restart multichain in Node 2?

pls help me,

thank you so much.
asked Aug 30, 2018 by Baonv

1 Answer

0 votes

In general, you should not be directly modifying MultiChain's files while the node is running. If you want to transfer an entire wallet across from one node to another, look at the dumpwallet and importwallet APIs. Please note however that importwallet will not remove any existing private keys.

answered Aug 31, 2018 by MultiChain
Thanks so much with you answer.

But I tested about 700.000 wallet addresses in a node, I called "dumpwallet". when It toke about 1 minute, But when I called "importwallet". It was very very long time. Do we have any other way faster?
Can we use "backupwallet" and restore then file back up? ( But I don't know how to restore  it. :) )
Can you please help me?
Thank you very much.
If there are 700,000 addresses in a node, you would indeed probably do better to directly copy the wallet.dat file across, but you must do this when neither node is running. After doing this you will also need to rescan the blockchain for transactions relating to these addresses, using the -rescan parameter. And finally we can't make any kind of guarantee about the performance you will experience - that is a very large number of addresses to store in one node.
...