node-blockchain
node-blockchain copied to clipboard
Shouldn't blocks on the chain have both previous & current hashes?
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?