Skip to content

Shouldn't blocks on the chain have both previous & current hashes? #6

@lbragile

Description

@lbragile

According to the Bitcoin whitepaper and many videos I see online on the topic each block has a header (current hash that was mined) and prevHash matching the header of the previous block. However, this is not provided here so the chain is not actually a chain, but just many non-connected blocks. Furthermore, it seems that when forming a new block, the prevHash is not considered, but rather a new hash is made using the getter from class Block. Is this approach correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions