Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I've added the ability to check your wallet balance easily, plus a few more features #88

Closed
wants to merge 6 commits into from

Conversation

sam-cutter
Copy link

@sam-cutter sam-cutter commented Feb 27, 2022

First of all, I've changed the way that blocks are saved. All elements of the block retain their original data type. This is especially beneficial for the block data. The block data can later be accessed by other files far easier than the previous method of saving the block data as a string.

A minor change, but the MINER_ADDRESS in the miner_config.py file now starts of blank. In the miner.py file, I've made it so that the miner won't start mining if the MINER_ADDRESS is left blank. This will stop new users from accidentally mining while not using their own wallet address. In the wallet.py file, when a user generates a new wallet, there is a message reminding them to save their wallet address in the miner_config.py file.

Also in the wallet.py file, the newly generated wallet also gets added to the .gitignore in case the the developer forgets to delete the wallet file. This makes development slightly more secure.

Users are now also able to check their wallet balance. My code loops through each block, and each transaction within that, then adds or subtracts, or does nothing to the wallet's balance accordingly. This is as per issue #82

This is my first pull request on this project. I'd really appreciate it if you could take a look through my code.

@inhyuk914
Copy link

I'd like to run this code myself, can I share the entire code?

@sam-cutter
Copy link
Author

I'd like to run this code myself, can I share the entire code?

Sure :)

@inhyuk914
Copy link

If the developer forgets to delete the wallet file, I wonder where the development would be safer if the newly created wallet was added as well. I'm sorry I'm a novice enlightener and I don't know much about this.

@inhyuk914
Copy link

Where does development become safer?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants