Skip to content

gudj0/blockchain-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Implementation in Python

The following contains a Python implementation of a basic blockchain

Implementation

The implementation consists of three files:

  • blockchain.py.
  • block.py
  • main.py

Tests

There are two unit-test files:

  • block_test.py tests the transaction functionality
  • blockchain_test.py tests the add_block and validate_block functionality.

Depdendencies

collections.defaultdict and uuid are the two only dependencies, both of which which are standard lib.

How to run

The main executable is in main.py. so just run $ python3 main.py to see an initial run of the transactions. Feel free to add commands in the main function to try out my implementation.

You can run all tests by running:

python3 block_test.py && python3 blockchain_test.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages