Membuat metode hashblock menggunakan algoritma hashing SHA256
Blockchain.prototype.hashBlock = function(prevBlockHash, currentBlockData, nonce) {
const dataString = prevBlockHash + nonce.toString() + JSON.stringify(currentBlockData);
const hash = sha256(dataString);
return hash;
}
Outrageous Ostrich