MCPcopy Index your code
hub / github.com/Savjee/SavjeeCoin / constructor

Method constructor

src/blockchain.js:81–87  ·  view source on GitHub ↗

* @param {number} timestamp * @param {Transaction[]} transactions * @param {string} previousHash

(timestamp, transactions, previousHash = '')

Source from the content-addressed store, hash-verified

79 * @param {string} previousHash
80 */
81 constructor(timestamp, transactions, previousHash = '') {
82 this.previousHash = previousHash;
83 this.timestamp = timestamp;
84 this.transactions = transactions;
85 this.nonce = 0;
86 this.hash = this.calculateHash();
87 }
88
89 /**
90 * Returns the SHA256 of this block (by processing all the data stored

Callers

nothing calls this directly

Calls 1

calculateHashMethod · 0.95

Tested by

no test coverage detected