I'm new at BTC mining and I'm still learning. I'm almost medium level in Python.
I'm looking for a Python miner that automatically mines using the last block and stops when a new block is found and if I'm lucky, the algorithm adds the new block to the blockchain and sends the prize to a specific wallet address that I can add.
But now for days I'm still looking and nothing.
I find a simple one, it keeps looking, but even if it finds a new block I don't know how to add that to the blockchain, and I don't know if the last block has been changed or not.
Is there any Python algorithm that do all of that, or a few lines of Python code which I can change?