- Let's create the directory structure first Root folder
Blockchain
, under thatBackend
,Frontend
andclient
. Under Backend,core
andutil
. - Inside cre create a file name
block.py
and create a class nameBlock
. Inside__init__
method talkeHeight, Blocksize, BlockHeader, TxCount, Txs
variables - Create a new module
blockheader.py
, create a class callBlockHeader
. Inside the__init__
method will takeversion, prevBlockHash, merkleRoot, timestamp, bits
and declareself.nonce = 0 , self.blockHash = ''