Modified miner code.