Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Mine empty block#80

Open
kousthubraja wants to merge 3 commits intomainfrom
mine-empty-block
Open

Mine empty block#80
kousthubraja wants to merge 3 commits intomainfrom
mine-empty-block

Conversation

@kousthubraja
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread app/codes/blockchain.py Outdated
return block

def empty_block_hash(self, block):
proof = 42 # Hardcoded value for empty block
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is the proof incorporated inside the block? Is the block passed by reference?

Comment thread app/codes/blockchain.py Outdated
proof = 42 # Hardcoded value for empty block
block_hash = self.calculate_hash(block)
block_hash = '0000' + block_hash[:4]
block['proof'] = proof
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line probably needs to move ahead of block_hash = self.calculate_has(block) ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants