Public Network
--maxpeers
would work, as would shutting off your network connection to the Internet. If you want to mine, you will have to run a miner, either in geth
or a GPU miner like ethminer
. But note that the difficulty set in the public network blockchain is very high as this difficulty is adjusted to cater for the many thousands of computers mining the public blockchain.
Once you shut off your connection from the public network and switch on your mining, it will take a very very long time for your single miner to solve a block. But if you leave your private mining operation on for another very very long time, the difficulty will adjust downward back so your single miner mining blocks every 15 seconds.
Private Network
If you are want to try creating smart contracts, your easiest path is to spin up a Dev blockchain. This will just run on your local computer and you can set it to mine to receive some ethers in your account so you can use it to send the contract creation transactions.
See Deploying the Greeter contract via the geth CLI is not registering in my private blockchain for an example of deploying contracts to a Dev blockchain.
The --dev
parameter will tell geth
that you want to only run a Dev blockchain. The --mine
and --minerthreads 1
parameters will tell your geth
instance to mine the blockchain.
The difficulty is set low so you will mine blocks quite frequently.
--maxpeers
would work, as would shutting off your network connection to the Internet. If you want to mine, you will have to run a miner, either ingeth
or a GPU miner likeethminer
. But note that the difficulty set in the public network blockchain is very high for your single miner to solve, so it will take quite a (very long) while for each block on your cut-off blockchain to be mined.