rcolomina / blockchain_py

Simple Blockchain using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project creates a simple blockchain using python:

Importing dependencies

First starts importing datetime and hashlib libraries to create timestamps and target hashes for the blocks.

Defining a Block

Seconds the block class is defined on its main elements with a hash function that sumarizes the attributes of a block nonce data previous hash timestamp block number

Defining the Block Chain

Third the blockchain class is defined implementing two methods add a block mine a block

Mining and Printing

Finally this will create a blockchian mining the block and printing out.

About

Simple Blockchain using Python


Languages

Language:Python 100.0%