I would like to take bitcoin block data and send it use it to avoid having to go through the blockchain download again on other computers in my local network. To ensure that no db corruption occurs, I stop bitcoin before the transfer. Running the unix command bitcoind stop
will return
Bitcoin has stopped running!
I notice that it does still run in top for a few moments after getting this message. This is not a problem right as it's never more than 15 seconds, however I am looking to automate this process using a simple php script.
Using bitcoin-rpc command such as $status = $bitcoin->stop()
would yeild a result of "Bitcoin has stopped running" but it may still be running in top.
How do I make sure that bitcoin really stopped running? Or is it safe to preform data transfer as soon as I get this message (does bitcoin keep writing to db after it notifies you it has stopped)?
top
for a couple of seconds is probably due to finalising the database, release all memory and stuff. I think you better put asleep(15)
(or 30, for safety's sake) then to program around it and make every millisecond count. – Mathias711 Apr 30 '14 at 15:29