Blockchain.prototype.hashBlock = function(prevBlockHash, currentBlockData, nonce) { const dataString = prevBlockHash + nonce.toString() + JSON.stringify(currentBlockData); const hash = sha256(dataString); return hash; }