code/part-one/blockchain.js
/**
   * Accepts a nonce, and generates a unique hash for the block. Updates the
   * hash and nonce properties of the block accordingly.
   *
   * Hint:
   *   The format of the hash is up to you. Remember that it needs to be
   *   unique and deterministic, and must become invalid if any of the block's
   *   properties change.
   */
Accepts a nonce, and generates a unique hash for the block. Updates the
hash and nonce properties of the block accordingly.

The format of the hash is up to you. Remember that it needs to be
unique and deterministic, and must become invalid if any of the block's
properties change.
Accepts a nonce and generates a unique hash for the block . Updates the hash and nonce properties of the block accordingly . The format of the hash is up to you . Remember that it needs to be unique and deterministic and must become invalid if any of the block ' s properties change .
calculateHash(nonce) {
    const { transactions, previousHash } = this;
    this.nonce = nonce;
    let sigs = transactions.map(t => t.signature);
    const newHash = sigs.join('') + previousHash + nonce;
    this.hash = createHash('sha256').update(newHash).digest('hex');
    return this.hash;
  }
calculateHash ( nonce ) { const { transactions , previousHash } = this ; this . nonce = nonce ; let sigs = transactions . map ( t => t . signature ) ; const newHash = sigs . join ( '' ) + previousHash + nonce ; this . hash = createHash ( 'sha256' ) . update ( newHash ) . digest ( 'hex' ) ; return this . hash ; }
Accepts a nonce, and generates a unique hash for the block.
Accepts a nonce and generates a unique hash for the block .
// "hash salt" // collection of unique, signatures