Hmm, I don't fancy re-indexing the DB on one build while the other is producing blocks, surely that's a recipe for disaster?
only if both are supposed to be producing blocks. The way I do it is what people mentioned before, but instead of locking/unlocking the wallet, I just "switch" them using
wallet_delegate_set_block_production ALL true
or
wallet_delegate_set_block_production ALL false
which is instantaneous, ie:
client 1: producing blocks, this is the client I want to upgrade (usually on a VPS)
run client 2, same version as client 1 (same wallet too, usually on my laptop). By default, it has block_production=false
# when there is time before next block production (use get_info['next_block_production_time'] on client 1 to know)
client 1: wallet_delegate_set_block_production ALL false
client 2: wallet_delegate_set_block_production ALL true
# now client 2 is producing, so basically you can do whatever you want with client 1, in particular
exit client 1
recompile client 1
run client 1, unlock it
# reindexing can indeed take some time, but is not a problem since last time you were running client 1 it had block_production=false,
# so it will still have it, so it can come fully online whenever it wants, you won't produce forks
# wait for another moment before next block production (same as before, but checking on client 2 now), then
client 1: wallet_delegate_set_block_production ALL true
client 2: wallet_delegate_set_block_production ALL false
# at this point, client 1 is upgraded and fully operational again, you can exit client 2 and relax after a smooth upgrade :)
This seems a bit contrived at first, but will feel very natural after a few times
To check on the clients while upgrading, I use some python tools that I wrote specifically for that purpose, in particular I use this view:
https://raw.githubusercontent.com/wackou/bts_tools/master/bts_tools_screenshot2.pngIn this screenshot, you can actually see that I run the client on localhost while recompiling on the server (remote host) and that now would be a bad time to switch, as there are only 39 seconds before my next scheduled block production.
You can get the tools here:
https://github.com/wackou/bts_tools