Update stake miner. Remove duplicate implementation in main.cpp