conformal/btcsim — pull request #5 by kargakis (2014-06-18 16:55:07+00:00)
Title: Add mining

Mining has been added with the use of the ```NewMiner``` function so now a
complete simulation is possible to happen. The way ```NewMiner``` works is
that it shutdowns the initial btcd and replaces it with a cpu-mining
enabled btcd relying on the fact that btcwallet instances, when disconnected,
will constantly try to reconnect back to the same port.

Also the communication between actors and the main goroutine has been
upgraded to accomodate actors with insufficient funds.

The reason i have specified two ways of starting the mining btcd (one where logs and
data are saved in the default btcd path and the second on temporary directory)
is because it takes some time to reach blocks that get generated in a reasonable
way so there will be simulation (probably most if not all simulations) where we will
want our blockchain to preserve and not get deleted.