This question already has an answer here:
I have started a geth client using the below client(I had already created two accounts.:
geth --datadir datadir --networkid 123 --rpc --rpcaddr="localhost" --rpccorsdomain="*" --unlock <my account> --minerthreads="1" --maxpeers=0 --mine console
I opened the the ethereum wallet and deployed the smart contract from there. The transactionId and the contract address is received on my geth console.
Then I started my Dapp and created the instances of the contract and I am calling the contract invoking a contract function through web3 API. The contract function gets invoked but the transaction does not get submitted in the block unless I start mining. Hence I started miner.start() This started mining numerous blocks.
My question is where are these blocks coming from if I have my own private net and have submitted only one transaction. This is adding too many blocks and my blocksize is increasing unnecessarily. How to mine only the transaction I have submitted?