First of all, I updated your Code Style to valid PEP8
Then I included the main function created
Then I updated the mining algorithm:
You added the 'blockNo' and the 'previous_hash' in the add-function of the Blockchain class, which changes the hash of the block. Therefore the Proof of Work from the mine-function is invalid.
First of all, I updated your Code Style to valid PEP8 Then I included the main function created
Then I updated the mining algorithm: You added the 'blockNo' and the 'previous_hash' in the add-function of the Blockchain class, which changes the hash of the block. Therefore the Proof of Work from the mine-function is invalid.